Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 122027: Remove the Menu object, converting all the remaining callers to use Menu2. I'... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/bookmark_table_view.h ('k') | chrome/browser/views/tabs/tab_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 18306)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -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::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) {
« no previous file with comments | « chrome/browser/views/bookmark_table_view.h ('k') | chrome/browser/views/tabs/tab_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698