Bug 1156515 - Remove 'New e10s Window' (r=felipe)

This commit is contained in:
Bill McCloskey 2015-04-28 16:34:00 -07:00
parent 813b993854
commit 5e5c24ede0
4 changed files with 15 additions and 37 deletions

View File

@ -28,10 +28,6 @@
command="Tools:PrivateBrowsing"
key="key_privatebrowsing"/>
#ifdef E10S_TESTING_ONLY
<menuitem id="menu_newRemoteWindow"
label="New e10s Window"
hidden="true"
command="Tools:RemoteWindow"/>
<menuitem id="menu_newNonRemoteWindow"
label="New Non-e10s Window"
hidden="true"

View File

@ -114,8 +114,6 @@
<command id="Tools:PrivateBrowsing"
oncommand="OpenBrowserWindow({private: true});" reserved="true"/>
#ifdef E10S_TESTING_ONLY
<command id="Tools:RemoteWindow"
oncommand="OpenBrowserWindow({remote: true});"/>
<command id="Tools:NonRemoteWindow"
oncommand="OpenBrowserWindow({remote: false});"/>
#endif

View File

@ -7230,10 +7230,8 @@ let gRemoteTabsUI = {
}
#endif
let newRemoteWindow = document.getElementById("menu_newRemoteWindow");
let newNonRemoteWindow = document.getElementById("menu_newNonRemoteWindow");
let autostart = Services.appinfo.browserTabsRemoteAutostart;
newRemoteWindow.hidden = autostart;
newNonRemoteWindow.hidden = !autostart;
}
};

View File

@ -1217,27 +1217,6 @@ if (Services.prefs.getBoolPref("browser.pocket.enabled")) {
}
#ifdef E10S_TESTING_ONLY
/**
* The e10s button's purpose is to lower the barrier of entry
* for our Nightly testers to use e10s windows. We'll be removing it
* once remote tabs are enabled. This button should never ever make it
* to production. If it does, that'd be bad, and we should all feel bad.
*/
let getCommandFunction = function(aOpenRemote) {
return function(aEvent) {
let win = aEvent.view;
if (win && typeof win.OpenBrowserWindow == "function") {
win.OpenBrowserWindow({remote: aOpenRemote});
}
};
}
let openRemote = !Services.appinfo.browserTabsRemoteAutostart;
// Like the XUL menuitem counterparts, we hard-code these strings in because
// this button should never roll into production.
let buttonLabel = openRemote ? "New e10s Window"
: "New Non-e10s Window";
let e10sDisabled = Services.appinfo.inSafeMode;
#ifdef XP_MACOSX
// On OS X, "Disable Hardware Acceleration" also disables OMTC and forces
@ -1245,12 +1224,19 @@ let e10sDisabled = Services.appinfo.inSafeMode;
e10sDisabled |= Services.prefs.getBoolPref("layers.acceleration.disabled");
#endif
CustomizableWidgets.push({
id: "e10s-button",
label: buttonLabel,
tooltiptext: buttonLabel,
disabled: e10sDisabled,
defaultArea: CustomizableUI.AREA_PANEL,
onCommand: getCommandFunction(openRemote),
});
if (Services.appinfo.browserTabsRemoteAutostart) {
CustomizableWidgets.push({
id: "e10s-button",
label: "New Non-e10s Window",
tooltiptext: "New Non-e10s Window",
disabled: e10sDisabled,
defaultArea: CustomizableUI.AREA_PANEL,
onCommand: function(aEvent) {
let win = aEvent.view;
if (win && typeof win.OpenBrowserWindow == "function") {
win.OpenBrowserWindow({remote: false});
}
},
});
}
#endif