зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 0df9c1afedc2 (bug 1292317)
This commit is contained in:
Родитель
2355193100
Коммит
9ca8ab908c
|
@ -54,8 +54,6 @@ PluginContent.prototype = {
|
|||
global.addMessageListener("BrowserPlugins:NPAPIPluginProcessCrashed", this);
|
||||
global.addMessageListener("BrowserPlugins:CrashReportSubmitted", this);
|
||||
global.addMessageListener("BrowserPlugins:Test:ClearCrashData", this);
|
||||
|
||||
Services.obs.addObserver(this, "decoder-doctor-notification", false);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
|
@ -77,9 +75,6 @@ PluginContent.prototype = {
|
|||
global.removeMessageListener("BrowserPlugins:NPAPIPluginProcessCrashed", this);
|
||||
global.removeMessageListener("BrowserPlugins:CrashReportSubmitted", this);
|
||||
global.removeMessageListener("BrowserPlugins:Test:ClearCrashData", this);
|
||||
|
||||
Services.obs.removeObserver(this, "decoder-doctor-notification");
|
||||
|
||||
delete this.global;
|
||||
delete this.content;
|
||||
},
|
||||
|
@ -123,26 +118,6 @@ PluginContent.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
observe: function observe(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "decoder-doctor-notification":
|
||||
let data = JSON.parse(aData);
|
||||
if (this.haveShownNotification &&
|
||||
aSubject.top.document == this.content.document &&
|
||||
data.formats.toLowerCase().includes("application/x-mpegurl", 0)) {
|
||||
let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
|
||||
let principal = this.content.document.nodePrincipal;
|
||||
let location = this.content.document.location.href;
|
||||
this.global.content.pluginRequiresReload = true;
|
||||
this.global.sendAsyncMessage("PluginContent:ShowClickToPlayNotification",
|
||||
{ plugins: [... this.pluginData.values()],
|
||||
showNow: true,
|
||||
location: location,
|
||||
}, null, principal);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onPageShow: function (event) {
|
||||
// Ignore events that aren't from the main document.
|
||||
if (!this.content || event.target != this.content.document) {
|
||||
|
@ -165,7 +140,6 @@ PluginContent.prototype = {
|
|||
|
||||
this._finishRecordingFlashPluginTelemetry();
|
||||
this.clearPluginCaches();
|
||||
this.haveShownNotification = false;
|
||||
},
|
||||
|
||||
getPluginUI: function (plugin, anonid) {
|
||||
|
@ -751,11 +725,9 @@ PluginContent.prototype = {
|
|||
}
|
||||
}
|
||||
|
||||
// If there are no instances of the plugin on the page any more or if we've
|
||||
// noted that the content needs to be reloaded due to replacing HLS, what the
|
||||
// If there are no instances of the plugin on the page any more, what the
|
||||
// user probably needs is for us to allow and then refresh.
|
||||
if (newState != "block" &&
|
||||
(!pluginFound || contentWindow.pluginRequiresReload)) {
|
||||
if (newState != "block" && !pluginFound) {
|
||||
this.reloadPage();
|
||||
}
|
||||
this.updateNotificationUI();
|
||||
|
@ -817,8 +789,6 @@ PluginContent.prototype = {
|
|||
this.pluginData.set(pluginInfo.permissionString, pluginInfo);
|
||||
}
|
||||
|
||||
this.haveShownNotification = true;
|
||||
|
||||
this.global.sendAsyncMessage("PluginContent:ShowClickToPlayNotification", {
|
||||
plugins: [... this.pluginData.values()],
|
||||
showNow: showNow,
|
||||
|
|
|
@ -391,7 +391,7 @@ pref("media.gmp.storage.version.expected", 1);
|
|||
|
||||
// Filter what triggers user notifications.
|
||||
// See DecoderDoctorDocumentWatcher::ReportAnalysis for details.
|
||||
pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaUnsupportedLibavcodec,MediaCannotPlayNoDecoders,MediaNoDecoders");
|
||||
pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaUnsupportedLibavcodec");
|
||||
// Whether we report partial failures.
|
||||
pref("media.decoder-doctor.verbose", false);
|
||||
// Whether DD should consider WMF-disabled a WMF failure, useful for testing.
|
||||
|
|
Загрузка…
Ссылка в новой задаче