diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 23:04:48 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 23:04:48 +0000 |
commit | de8fa75a19722641ea23febd40bd240530aec23a (patch) | |
tree | 3c5ce40c2e13fdb556adcae49c9d179a9a8ca59b /chrome/browser/views | |
parent | f383a285ab48d845321956cd48bc210f1a975adf (diff) | |
download | chromium_src-de8fa75a19722641ea23febd40bd240530aec23a.zip chromium_src-de8fa75a19722641ea23febd40bd240530aec23a.tar.gz chromium_src-de8fa75a19722641ea23febd40bd240530aec23a.tar.bz2 |
Cleanup part 2.
Add appcommands that we have browser commands for.
BUG=1113069
Review URL: http://codereview.chromium.org/13639
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6549 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 50 |
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() { |