mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1094234 - Get rid of unused BrowserApp.shutdown method. r=mfinkle
This commit is contained in:
parent
0bb1ace29e
commit
6e4d54d867
@ -84,22 +84,6 @@ var CastingApps = {
|
||||
BrowserApp.deck.addEventListener("ended", this, true);
|
||||
},
|
||||
|
||||
uninit: function ca_uninit() {
|
||||
BrowserApp.deck.removeEventListener("TabSelect", this, true);
|
||||
BrowserApp.deck.removeEventListener("pageshow", this, true);
|
||||
BrowserApp.deck.removeEventListener("playing", this, true);
|
||||
BrowserApp.deck.removeEventListener("ended", this, true);
|
||||
|
||||
Services.obs.removeObserver(this, "Casting:Play");
|
||||
Services.obs.removeObserver(this, "Casting:Pause");
|
||||
Services.obs.removeObserver(this, "Casting:Stop");
|
||||
Services.obs.removeObserver(this, "Casting:Mirror");
|
||||
Services.obs.removeObserver(this, "ssdp-service-found");
|
||||
Services.obs.removeObserver(this, "ssdp-service-lost");
|
||||
|
||||
NativeWindow.contextmenus.remove(this._castMenuId);
|
||||
},
|
||||
|
||||
_mirrorStarted: function(stopMirrorCallback) {
|
||||
this.stopMirrorCallback = stopMirrorCallback;
|
||||
NativeWindow.menu.update(this.mirrorStartMenuId, { visible: false });
|
||||
|
@ -275,22 +275,6 @@ let Reader = {
|
||||
yield OS.File.remove(path);
|
||||
}),
|
||||
|
||||
uninit: function Reader_uninit() {
|
||||
Services.prefs.removeObserver("reader.parse-on-load.", this);
|
||||
|
||||
Services.obs.removeObserver(this, "Reader:Removed");
|
||||
|
||||
let requests = this._requests;
|
||||
for (let url in requests) {
|
||||
let request = requests[url];
|
||||
if (request.browser) {
|
||||
let browser = request.browser;
|
||||
browser.parentNode.removeChild(browser);
|
||||
}
|
||||
}
|
||||
delete this._requests;
|
||||
},
|
||||
|
||||
log: function(msg) {
|
||||
if (this.DEBUG)
|
||||
dump("Reader: " + msg);
|
||||
|
@ -18,17 +18,6 @@ var WebcompatReporter = {
|
||||
this.addMenuItem();
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
Services.obs.removeObserver(this, "DesktopMode:Change");
|
||||
Services.obs.removeObserver(this, "chrome-document-global-created");
|
||||
Services.obs.removeObserver(this, "content-document-global-created");
|
||||
|
||||
if (this.menuItem) {
|
||||
NativeWindow.menu.remove(this.menuItem);
|
||||
this.menuItem = null;
|
||||
}
|
||||
},
|
||||
|
||||
observe: function(subject, topic, data) {
|
||||
if (topic == "content-document-global-created" || topic == "chrome-document-global-created") {
|
||||
let win = subject;
|
||||
|
@ -894,29 +894,6 @@ var BrowserApp = {
|
||||
}
|
||||
},
|
||||
|
||||
shutdown: function shutdown() {
|
||||
NativeWindow.uninit();
|
||||
LightWeightThemeWebInstaller.uninit();
|
||||
FormAssistant.uninit();
|
||||
IndexedDB.uninit();
|
||||
ViewportHandler.uninit();
|
||||
XPInstallObserver.uninit();
|
||||
HealthReportStatusListener.uninit();
|
||||
CharacterEncoding.uninit();
|
||||
SearchEngines.uninit();
|
||||
RemoteDebugger.uninit();
|
||||
Reader.uninit();
|
||||
UserAgentOverrides.uninit();
|
||||
DesktopUserAgent.uninit();
|
||||
ExternalApps.uninit();
|
||||
CastingApps.uninit();
|
||||
Distribution.uninit();
|
||||
Tabs.uninit();
|
||||
#ifdef NIGHTLY_BUILD
|
||||
WebcompatReporter.uninit();
|
||||
#endif
|
||||
},
|
||||
|
||||
// This function returns false during periods where the browser displayed document is
|
||||
// different from the browser content document, so user actions and some kinds of viewport
|
||||
// updates should be ignored. This period starts when we start loading a new page or
|
||||
@ -2026,14 +2003,6 @@ var NativeWindow = {
|
||||
this.contextmenus.init();
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
Services.obs.removeObserver(this, "Menu:Clicked");
|
||||
Services.obs.removeObserver(this, "Doorhanger:Reply");
|
||||
Services.obs.removeObserver(this, "Toast:Click", false);
|
||||
Services.obs.removeObserver(this, "Toast:Hidden", false);
|
||||
this.contextmenus.uninit();
|
||||
},
|
||||
|
||||
loadDex: function(zipFile, implClass) {
|
||||
Messaging.sendRequest({
|
||||
type: "Dex:Load",
|
||||
@ -2217,10 +2186,6 @@ var NativeWindow = {
|
||||
BrowserApp.deck.addEventListener("contextmenu", this.show.bind(this), false);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
BrowserApp.deck.removeEventListener("contextmenu", this.show.bind(this), false);
|
||||
},
|
||||
|
||||
add: function() {
|
||||
let args;
|
||||
if (arguments.length == 1) {
|
||||
@ -2878,12 +2843,6 @@ var LightWeightThemeWebInstaller = {
|
||||
BrowserApp.deck.addEventListener("ResetBrowserThemePreview", this, false, true);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
BrowserApp.deck.removeEventListener("InstallBrowserTheme", this, false, true);
|
||||
BrowserApp.deck.removeEventListener("PreviewBrowserTheme", this, false, true);
|
||||
BrowserApp.deck.removeEventListener("ResetBrowserThemePreview", this, false, true);
|
||||
},
|
||||
|
||||
handleEvent: function (event) {
|
||||
switch (event.type) {
|
||||
case "InstallBrowserTheme":
|
||||
@ -3001,10 +2960,6 @@ var DesktopUserAgent = {
|
||||
.replace(/Gecko\/[0-9\.]+/, "Gecko/20100101");
|
||||
},
|
||||
|
||||
uninit: function ua_uninit() {
|
||||
Services.obs.removeObserver(this, "DesktopMode:Change");
|
||||
},
|
||||
|
||||
onRequest: function(channel, defaultUA) {
|
||||
let channelWindow = this._getWindowForRequest(channel);
|
||||
let tab = BrowserApp.getTabForWindow(channelWindow);
|
||||
@ -5528,21 +5483,6 @@ var FormAssistant = {
|
||||
LoginManagerParent.init();
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
Services.obs.removeObserver(this, "FormAssist:AutoComplete");
|
||||
Services.obs.removeObserver(this, "FormAssist:Blocklisted");
|
||||
Services.obs.removeObserver(this, "FormAssist:Hidden");
|
||||
Services.obs.removeObserver(this, "FormAssist:Remove");
|
||||
Services.obs.removeObserver(this, "invalidformsubmit");
|
||||
Services.obs.removeObserver(this, "PanZoom:StateChange");
|
||||
|
||||
BrowserApp.deck.removeEventListener("focus", this);
|
||||
BrowserApp.deck.removeEventListener("blur", this);
|
||||
BrowserApp.deck.removeEventListener("click", this);
|
||||
BrowserApp.deck.removeEventListener("input", this);
|
||||
BrowserApp.deck.removeEventListener("pageshow", this);
|
||||
},
|
||||
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "PanZoom:StateChange":
|
||||
@ -5891,17 +5831,6 @@ let HealthReportStatusListener = {
|
||||
}
|
||||
},
|
||||
|
||||
uninit: function () {
|
||||
Services.obs.removeObserver(this, "HealthReport:RequestSnapshot");
|
||||
Services.prefs.removeObserver(this.PREF_ACCEPT_LANG, this);
|
||||
Services.prefs.removeObserver(this.PREF_BLOCKLIST_ENABLED, this);
|
||||
if (this.PREF_TELEMETRY_ENABLED) {
|
||||
Services.prefs.removeObserver(this.PREF_TELEMETRY_ENABLED, this);
|
||||
}
|
||||
|
||||
AddonManager.removeAddonListener(this);
|
||||
},
|
||||
|
||||
observe: function (aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "HealthReport:RequestSnapshot":
|
||||
@ -6068,13 +5997,6 @@ var XPInstallObserver = {
|
||||
AddonManager.addInstallListener(XPInstallObserver);
|
||||
},
|
||||
|
||||
uninit: function xpi_uninit() {
|
||||
Services.obs.removeObserver(XPInstallObserver, "addon-install-blocked");
|
||||
Services.obs.removeObserver(XPInstallObserver, "addon-install-started");
|
||||
|
||||
AddonManager.removeInstallListener(XPInstallObserver);
|
||||
},
|
||||
|
||||
observe: function xpi_observer(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "addon-install-started":
|
||||
@ -6253,11 +6175,6 @@ var ViewportHandler = {
|
||||
Services.obs.addObserver(this, "Window:Resize", false);
|
||||
},
|
||||
|
||||
uninit: function uninit() {
|
||||
removeEventListener("DOMMetaAdded", this, false);
|
||||
Services.obs.removeObserver(this, "Window:Resize");
|
||||
},
|
||||
|
||||
handleEvent: function handleEvent(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "DOMMetaAdded":
|
||||
@ -6578,12 +6495,6 @@ var IndexedDB = {
|
||||
Services.obs.addObserver(this, this._quotaCancel, false);
|
||||
},
|
||||
|
||||
uninit: function IndexedDB_uninit() {
|
||||
Services.obs.removeObserver(this, this._permissionsPrompt);
|
||||
Services.obs.removeObserver(this, this._quotaPrompt);
|
||||
Services.obs.removeObserver(this, this._quotaCancel);
|
||||
},
|
||||
|
||||
observe: function IndexedDB_observe(subject, topic, data) {
|
||||
if (topic != this._permissionsPrompt &&
|
||||
topic != this._quotaPrompt &&
|
||||
@ -6680,11 +6591,6 @@ var CharacterEncoding = {
|
||||
this.sendState();
|
||||
},
|
||||
|
||||
uninit: function uninit() {
|
||||
Services.obs.removeObserver(this, "CharEncoding:Get");
|
||||
Services.obs.removeObserver(this, "CharEncoding:Set");
|
||||
},
|
||||
|
||||
observe: function observe(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "CharEncoding:Get":
|
||||
@ -7007,17 +6913,6 @@ var SearchEngines = {
|
||||
});
|
||||
},
|
||||
|
||||
uninit: function uninit() {
|
||||
Services.obs.removeObserver(this, "SearchEngines:Add");
|
||||
Services.obs.removeObserver(this, "SearchEngines:GetVisible");
|
||||
Services.obs.removeObserver(this, "SearchEngines:Remove");
|
||||
Services.obs.removeObserver(this, "SearchEngines:RestoreDefaults");
|
||||
Services.obs.removeObserver(this, "SearchEngines:SetDefault");
|
||||
Services.obs.removeObserver(this, "browser-search-engine-modified");
|
||||
if (this._contextMenuId != null)
|
||||
NativeWindow.contextmenus.remove(this._contextMenuId);
|
||||
},
|
||||
|
||||
// Fetch list of search engines. all ? All engines : Visible engines only.
|
||||
_handleSearchEnginesGetVisible: function _handleSearchEnginesGetVisible(rv, all) {
|
||||
if (!Components.isSuccessCode(rv)) {
|
||||
@ -7346,11 +7241,6 @@ var RemoteDebugger = {
|
||||
}
|
||||
},
|
||||
|
||||
uninit: function rd_uninit() {
|
||||
Services.prefs.removeObserver("devtools.debugger.", this);
|
||||
this._stop();
|
||||
},
|
||||
|
||||
_getPort: function _rd_getPort() {
|
||||
return Services.prefs.getIntPref("devtools.debugger.remote-port");
|
||||
},
|
||||
@ -7475,13 +7365,6 @@ var ExternalApps = {
|
||||
}, this.filter, this.openExternal);
|
||||
},
|
||||
|
||||
uninit: function helper_uninit() {
|
||||
if (this._contextMenuId !== null) {
|
||||
NativeWindow.contextmenus.remove(this._contextMenuId);
|
||||
}
|
||||
this._contextMenuId = null;
|
||||
},
|
||||
|
||||
filter: {
|
||||
matches: function(aElement) {
|
||||
let uri = ExternalApps._getMediaLink(aElement);
|
||||
@ -7611,12 +7494,6 @@ var Distribution = {
|
||||
this.readJSON(this._file, this.update);
|
||||
},
|
||||
|
||||
uninit: function dc_uninit() {
|
||||
Services.obs.removeObserver(this, "Distribution:Set");
|
||||
Services.obs.removeObserver(this, "prefservice:after-app-defaults");
|
||||
Services.obs.removeObserver(this, "Campaign:Set");
|
||||
},
|
||||
|
||||
observe: function dc_observe(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "Distribution:Set":
|
||||
@ -7765,19 +7642,6 @@ var Tabs = {
|
||||
BrowserApp.deck.addEventListener("TabOpen", this, false);
|
||||
},
|
||||
|
||||
uninit: function() {
|
||||
if (!this._enableTabExpiration) {
|
||||
// If _enableTabExpiration is true then we won't have this
|
||||
// observer registered any more.
|
||||
Services.obs.removeObserver(this, "memory-pressure");
|
||||
}
|
||||
|
||||
Services.obs.removeObserver(this, "Session:Prefetch");
|
||||
|
||||
BrowserApp.deck.removeEventListener("pageshow", this);
|
||||
BrowserApp.deck.removeEventListener("TabOpen", this);
|
||||
},
|
||||
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
switch (aTopic) {
|
||||
case "memory-pressure":
|
||||
|
Loading…
Reference in New Issue
Block a user