summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame/browser_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/frame/browser_view.cc')
-rw-r--r--chrome/browser/views/frame/browser_view.cc50
1 files changed, 20 insertions, 30 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 7c84c6d..4a54a4e 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -1280,40 +1280,30 @@ void BrowserView::BuildMenuForTabStriplessWindow(Menu* menu,
int BrowserView::GetCommandIDForAppCommandID(int app_command_id) const {
switch (app_command_id) {
- case APPCOMMAND_BROWSER_BACKWARD:
- return IDC_BACK;
- case APPCOMMAND_BROWSER_FORWARD:
- return IDC_FORWARD;
- case APPCOMMAND_BROWSER_REFRESH:
- return IDC_RELOAD;
- case APPCOMMAND_BROWSER_HOME:
- return IDC_HOME;
- case APPCOMMAND_BROWSER_STOP:
- return IDC_STOP;
- case APPCOMMAND_BROWSER_SEARCH:
- return IDC_FOCUS_SEARCH;
- case APPCOMMAND_CLOSE:
- return IDC_CLOSE_TAB;
- case APPCOMMAND_NEW:
- return IDC_NEW_TAB;
- case APPCOMMAND_OPEN:
- return IDC_OPEN_FILE;
- case APPCOMMAND_PRINT:
- return IDC_PRINT;
-
- // TODO(pkasting): http://b/1113069 Handle all these.
- case APPCOMMAND_HELP:
- case APPCOMMAND_SAVE:
+ // NOTE: The order here matches the APPCOMMAND declaration order in the
+ // Windows headers.
+ case APPCOMMAND_BROWSER_BACKWARD: return IDC_BACK;
+ case APPCOMMAND_BROWSER_FORWARD: return IDC_FORWARD;
+ case APPCOMMAND_BROWSER_REFRESH: return IDC_RELOAD;
+ case APPCOMMAND_BROWSER_HOME: return IDC_HOME;
+ case APPCOMMAND_BROWSER_STOP: return IDC_STOP;
+ case APPCOMMAND_BROWSER_SEARCH: return IDC_FOCUS_SEARCH;
+ case APPCOMMAND_HELP: return IDC_HELP_PAGE;
+ case APPCOMMAND_NEW: return IDC_NEW_TAB;
+ case APPCOMMAND_OPEN: return IDC_OPEN_FILE;
+ case APPCOMMAND_CLOSE: return IDC_CLOSE_TAB;
+ case APPCOMMAND_SAVE: return IDC_SAVE_PAGE;
+ case APPCOMMAND_PRINT: return IDC_PRINT;
+ case APPCOMMAND_COPY: return IDC_COPY;
+ case APPCOMMAND_CUT: return IDC_CUT;
+ case APPCOMMAND_PASTE: return IDC_PASTE;
+
+ // TODO(pkasting): http://b/1113069 Handle these.
case APPCOMMAND_UNDO:
case APPCOMMAND_REDO:
- case APPCOMMAND_COPY:
- case APPCOMMAND_CUT:
- case APPCOMMAND_PASTE:
case APPCOMMAND_SPELL_CHECK:
- default:
- break;
+ default: return -1;
}
- return -1;
}
void BrowserView::LoadingAnimationCallback() {