summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-12 20:44:28 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-12 20:44:28 +0000
commitcdb4266b62202b44eb1fb36877398c2cb5504917 (patch)
tree60f5de9c0460d67cd7150ba5f2e33499892c38b2 /chrome/browser/views/frame
parentf148ed7a47e14416efd1cc2666ea331fbcf5aa42 (diff)
downloadchromium_src-cdb4266b62202b44eb1fb36877398c2cb5504917.zip
chromium_src-cdb4266b62202b44eb1fb36877398c2cb5504917.tar.gz
chromium_src-cdb4266b62202b44eb1fb36877398c2cb5504917.tar.bz2
Remove the Menu object, converting all the remaining callers to use Menu2. I'll rename Menu2->Menu afterwards.
TEST=none BUG=none Review URL: http://codereview.chromium.org/122027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame')
-rw-r--r--chrome/browser/views/frame/browser_view.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 1b3e42b..db7a04f 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -55,7 +55,6 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/webkit_resources.h"
-#include "views/controls/menu/menu.h"
#if defined(OS_WIN)
#include "views/controls/scrollbar/native_scroll_bar.h"
#endif
@@ -461,6 +460,20 @@ bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) {
}
bool BrowserView::GetAccelerator(int cmd_id, views::Accelerator* accelerator) {
+ // The standard Ctrl-X, Ctrl-V and Ctrl-C are not defined as accelerators
+ // anywhere so we need to check for them explicitly here.
+ switch (cmd_id) {
+ case IDC_CUT:
+ *accelerator = views::Accelerator(L'X', false, true, false);
+ return true;
+ case IDC_COPY:
+ *accelerator = views::Accelerator(L'C', false, true, false);
+ return true;
+ case IDC_PASTE:
+ *accelerator = views::Accelerator(L'V', false, true, false);
+ return true;
+ }
+ // Else, we retrieve the accelerator information from the accelerator table.
std::map<views::Accelerator, int>::iterator it =
accelerator_table_->begin();
for (; it != accelerator_table_->end(); ++it) {