Bug 1140522: Ensure proper use of appDisabled and userDisabled in GMPProvider.jsm. r=mossop

This commit is contained in:
Stephen Pohl 2015-03-10 20:30:58 -04:00
parent fe55cac263
commit f44cf7f44d

View File

@ -214,13 +214,15 @@ GMPWrapper.prototype = {
this._plugin.id); },
get isActive() { return !this.userDisabled; },
get appDisabled() { return false; },
get userDisabled() {
get appDisabled() {
if (this._plugin.isEME && !GMPPrefs.get(KEY_EME_ENABLED, true)) {
// If "media.eme.enabled" is false, all EME plugins are disabled.
return true;
}
return false;
},
get userDisabled() {
return !GMPPrefs.get(KEY_PLUGIN_ENABLED, true, this._plugin.id);
},
set userDisabled(aVal) { GMPPrefs.set(KEY_PLUGIN_ENABLED, aVal === false,