mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1089867: Disable and hide Adobe EME by default and add ability to hide hidden GMPs in addon manager. r=gfritzsche
This commit is contained in:
parent
02d8c846af
commit
1d8e98c4db
@ -4527,6 +4527,9 @@ pref("media.gmp-manager.certs.1.issuerName", "CN=DigiCert Secure Server CA,O=Dig
|
||||
pref("media.gmp-manager.certs.1.commonName", "aus4.mozilla.org");
|
||||
pref("media.gmp-manager.certs.2.issuerName", "CN=Thawte SSL CA,O=\"Thawte, Inc.\",C=US");
|
||||
pref("media.gmp-manager.certs.2.commonName", "aus4.mozilla.org");
|
||||
|
||||
// Adobe EME is currently pref'd off by default and hidden in the addon manager.
|
||||
pref("media.gmp-eme-adobe.hidden", true);
|
||||
#endif
|
||||
|
||||
// Whether or not to perform reader mode article parsing on page load.
|
||||
|
@ -113,6 +113,7 @@ let GMPPrefs = {
|
||||
KEY_ADDON_LAST_UPDATE: "media.{0}.lastUpdate",
|
||||
KEY_ADDON_VERSION: "media.{0}.version",
|
||||
KEY_ADDON_AUTOUPDATE: "media.{0}.autoupdate",
|
||||
KEY_ADDON_HIDDEN: "media.{0}.hidden",
|
||||
KEY_URL: "media.gmp-manager.url",
|
||||
KEY_URL_OVERRIDE: "media.gmp-manager.url.override",
|
||||
KEY_CERT_CHECKATTRS: "media.gmp-manager.cert.checkAttributes",
|
||||
@ -452,8 +453,9 @@ GMPInstallManager.prototype = {
|
||||
log.info("Found " + gmpAddons.length + " addons advertised.");
|
||||
let addonsToInstall = gmpAddons.filter(function(gmpAddon) {
|
||||
log.info("Found addon: " + gmpAddon.toString());
|
||||
if (!gmpAddon.isValid || gmpAddon.isInstalled) {
|
||||
log.info("Addon invalid or already installed.");
|
||||
|
||||
if (gmpAddon.isHidden || !gmpAddon.isValid || gmpAddon.isInstalled) {
|
||||
log.info("Addon hidden, invalid or already installed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -734,6 +736,9 @@ GMPAddon.prototype = {
|
||||
get isInstalled() {
|
||||
return this.version &&
|
||||
GMPPrefs.get(GMPPrefs.KEY_ADDON_VERSION, "", this.id) === this.version;
|
||||
},
|
||||
get isHidden() {
|
||||
return GMPPrefs.get(GMPPrefs.KEY_ADDON_HIDDEN, false, this.id);
|
||||
}
|
||||
};
|
||||
/**
|
||||
|
@ -43,6 +43,7 @@ const KEY_PLUGIN_ENABLED = "media.{0}.enabled";
|
||||
const KEY_PLUGIN_LAST_UPDATE = "media.{0}.lastUpdate";
|
||||
const KEY_PLUGIN_VERSION = "media.{0}.version";
|
||||
const KEY_PLUGIN_AUTOUPDATE = "media.{0}.autoupdate";
|
||||
const KEY_PLUGIN_HIDDEN = "media.{0}.hidden";
|
||||
|
||||
// Note regarding the value of |fullDescription| below: This is part of an awful
|
||||
// hack to include the licenses for GMP plugins without having bug 624602 fixed
|
||||
@ -540,18 +541,21 @@ let GMPProvider = {
|
||||
buildPluginList: function() {
|
||||
let map = new Map();
|
||||
GMP_PLUGINS.forEach(aPlugin => {
|
||||
let plugin = {
|
||||
id: aPlugin.id,
|
||||
name: pluginsBundle.GetStringFromName(aPlugin.name),
|
||||
description: pluginsBundle.GetStringFromName(aPlugin.description),
|
||||
fullDescription: aPlugin.fullDescription,
|
||||
homepageURL: aPlugin.homepageURL,
|
||||
optionsURL: aPlugin.optionsURL,
|
||||
wrapper: null,
|
||||
isEME: aPlugin.isEME
|
||||
};
|
||||
plugin.wrapper = new GMPWrapper(plugin);
|
||||
map.set(plugin.id, plugin);
|
||||
// Only show GMPs in addon manager that aren't hidden.
|
||||
if (!GMPPrefs.get(KEY_PLUGIN_HIDDEN, false, aPlugin.id)) {
|
||||
let plugin = {
|
||||
id: aPlugin.id,
|
||||
name: pluginsBundle.GetStringFromName(aPlugin.name),
|
||||
description: pluginsBundle.GetStringFromName(aPlugin.description),
|
||||
fullDescription: aPlugin.fullDescription,
|
||||
homepageURL: aPlugin.homepageURL,
|
||||
optionsURL: aPlugin.optionsURL,
|
||||
wrapper: null,
|
||||
isEME: aPlugin.isEME
|
||||
};
|
||||
plugin.wrapper = new GMPWrapper(plugin);
|
||||
map.set(plugin.id, plugin);
|
||||
}
|
||||
});
|
||||
this._plugins = map;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user