Bug 731926 - Refactor init/shutdown functions in browser.js (trivial move of HandleAppCommandEvent). r=gavin

This commit is contained in:
Justin Dolske 2012-06-15 12:09:47 -07:00
parent 2c457ff2a9
commit 9cca843146

View File

@ -1152,35 +1152,6 @@ function BrowserStartup() {
gStartupRan = true;
}
function HandleAppCommandEvent(evt) {
evt.stopPropagation();
switch (evt.command) {
case "Back":
BrowserBack();
break;
case "Forward":
BrowserForward();
break;
case "Reload":
BrowserReloadSkipCache();
break;
case "Stop":
BrowserStop();
break;
case "Search":
BrowserSearch.webSearch();
break;
case "Bookmarks":
toggleSidebar('viewBookmarksSidebar');
break;
case "Home":
BrowserHome();
break;
default:
break;
}
}
function prepareForStartup() {
gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false);
@ -1819,6 +1790,35 @@ function initializeSanitizer()
}
}
function HandleAppCommandEvent(evt) {
evt.stopPropagation();
switch (evt.command) {
case "Back":
BrowserBack();
break;
case "Forward":
BrowserForward();
break;
case "Reload":
BrowserReloadSkipCache();
break;
case "Stop":
BrowserStop();
break;
case "Search":
BrowserSearch.webSearch();
break;
case "Bookmarks":
toggleSidebar('viewBookmarksSidebar');
break;
case "Home":
BrowserHome();
break;
default:
break;
}
}
function gotoHistoryIndex(aEvent) {
let index = aEvent.target.getAttribute("index");
if (!index)