Bug 1386594 - Remove XULBrowserWindow.init. r?johannh
MozReview-Commit-ID: 6uWcb9FMdNE
--- a/browser/base/content/browser-customization.js
+++ b/browser/base/content/browser-customization.js
@@ -59,17 +59,16 @@ var CustomizationHandler = {
},
_customizationEnding(aDetails) {
// Update global UI elements that may have been added or removed
if (aDetails.changed) {
gURLBar = document.getElementById("urlbar");
gHomeButton.updateTooltip();
- XULBrowserWindow.init();
if (AppConstants.platform != "macosx")
updateEditUIVisibility();
// Hacky: update the PopupNotifications' object's reference to the iconBox,
// if it already exists, since it may have changed if the URL bar was
// added/removed.
if (!window.__lookupGetter__("PopupNotifications")) {
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1327,20 +1327,16 @@ var gBrowserInit = {
ZoomUI.init(window);
let mm = window.getGroupMessageManager("browsers");
mm.loadFrameScript("chrome://browser/content/tab-content.js", true);
mm.loadFrameScript("chrome://browser/content/content.js", true);
mm.loadFrameScript("chrome://browser/content/content-UITour.js", true);
mm.loadFrameScript("chrome://global/content/manifestMessages.js", true);
- // initialize observers and listeners
- // and give C++ access to gBrowser
- XULBrowserWindow.init();
-
window.messageManager.addMessageListener("Browser:LoadURI", RedirectLoad);
if (!gMultiProcessBrowser) {
// There is a Content:Click message manually sent from content.
Cc["@mozilla.org/eventlistenerservice;1"]
.getService(Ci.nsIEventListenerService)
.addSystemEventListener(gBrowser, "click", contentAreaClick, true);
}
@@ -4448,22 +4444,16 @@ var XULBrowserWindow = {
delete this.isImage;
return this.isImage = document.getElementById("isImage");
},
get canViewSource() {
delete this.canViewSource;
return this.canViewSource = document.getElementById("canViewSource");
},
- init() {
- // Initialize the security button's state and tooltip text.
- var securityUI = gBrowser.securityUI;
- this.onSecurityChange(null, null, securityUI.state, true);
- },
-
setJSStatus() {
// unsupported
},
forceInitialBrowserRemote(aRemoteType) {
let initBrowser =
document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
gBrowser.updateBrowserRemoteness(initBrowser, true, { remoteType: aRemoteType });
@@ -7349,17 +7339,16 @@ var gIdentityHandler = {
/**
* This is called asynchronously when requested by the Logins module, after
* the insecure login forms state for the page has been updated.
*/
refreshForInsecureLoginForms() {
// Check this._uri because we don't want to refresh the user interface if
// this is called before the first page load in the window for any reason.
if (!this._uri) {
- Cu.reportError("Unexpected early call to refreshForInsecureLoginForms.");
return;
}
this.refreshIdentityBlock();
},
updateSharingIndicator() {
let tab = gBrowser.selectedTab;
let sharing = tab.getAttribute("sharing");