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

Side by Side Diff: chrome/browser/views/tab_contents/render_view_context_menu_views.cc

Issue 3337006: Revert 58388 - Revert 58215 - Revert 58186 - Move the keyboard files from bas... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/options/cookies_view.cc ('k') | chrome/browser/views/task_manager_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" 5 #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h"
6 6
7 #include "app/keyboard_codes.h"
8 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/keyboard_codes.h"
9 #include "chrome/app/chrome_dll_resource.h" 9 #include "chrome/app/chrome_dll_resource.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 #include "views/accelerator.h" 12 #include "views/accelerator.h"
13 #include "views/controls/menu/menu_2.h" 13 #include "views/controls/menu/menu_2.h"
14 14
15 //////////////////////////////////////////////////////////////////////////////// 15 ////////////////////////////////////////////////////////////////////////////////
16 // RenderViewContextMenuViews, public: 16 // RenderViewContextMenuViews, public:
17 17
18 RenderViewContextMenuViews::RenderViewContextMenuViews( 18 RenderViewContextMenuViews::RenderViewContextMenuViews(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #endif 61 #endif
62 } 62 }
63 63
64 bool RenderViewContextMenuViews::GetAcceleratorForCommandId( 64 bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
65 int command_id, 65 int command_id,
66 menus::Accelerator* accel) { 66 menus::Accelerator* accel) {
67 // There are no formally defined accelerators we can query so we assume 67 // There are no formally defined accelerators we can query so we assume
68 // that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do. 68 // that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do.
69 switch (command_id) { 69 switch (command_id) {
70 case IDC_CONTENT_CONTEXT_UNDO: 70 case IDC_CONTENT_CONTEXT_UNDO:
71 *accel = views::Accelerator(app::VKEY_Z, false, true, false); 71 *accel = views::Accelerator(base::VKEY_Z, false, true, false);
72 return true; 72 return true;
73 73
74 case IDC_CONTENT_CONTEXT_REDO: 74 case IDC_CONTENT_CONTEXT_REDO:
75 // TODO(jcampan): should it be Ctrl-Y? 75 // TODO(jcampan): should it be Ctrl-Y?
76 *accel = views::Accelerator(app::VKEY_Z, true, true, false); 76 *accel = views::Accelerator(base::VKEY_Z, true, true, false);
77 return true; 77 return true;
78 78
79 case IDC_CONTENT_CONTEXT_CUT: 79 case IDC_CONTENT_CONTEXT_CUT:
80 *accel = views::Accelerator(app::VKEY_X, false, true, false); 80 *accel = views::Accelerator(base::VKEY_X, false, true, false);
81 return true; 81 return true;
82 82
83 case IDC_CONTENT_CONTEXT_COPY: 83 case IDC_CONTENT_CONTEXT_COPY:
84 *accel = views::Accelerator(app::VKEY_C, false, true, false); 84 *accel = views::Accelerator(base::VKEY_C, false, true, false);
85 return true; 85 return true;
86 86
87 case IDC_CONTENT_CONTEXT_PASTE: 87 case IDC_CONTENT_CONTEXT_PASTE:
88 *accel = views::Accelerator(app::VKEY_V, false, true, false); 88 *accel = views::Accelerator(base::VKEY_V, false, true, false);
89 return true; 89 return true;
90 90
91 case IDC_CONTENT_CONTEXT_SELECTALL: 91 case IDC_CONTENT_CONTEXT_SELECTALL:
92 *accel = views::Accelerator(app::VKEY_A, false, true, false); 92 *accel = views::Accelerator(base::VKEY_A, false, true, false);
93 return true; 93 return true;
94 94
95 default: 95 default:
96 return false; 96 return false;
97 } 97 }
98 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/views/options/cookies_view.cc ('k') | chrome/browser/views/task_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698