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

Side by Side Diff: chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc

Issue 726853003: Adding Accelerator key for 'Reload' and 'View Source'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/views/renderer_context_menu/render_view_context_menu _views.h" 5 #include "chrome/browser/ui/views/renderer_context_menu/render_view_context_menu _views.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return true; 100 return true;
101 101
102 case IDC_CONTENT_CONTEXT_ROTATECW: 102 case IDC_CONTENT_CONTEXT_ROTATECW:
103 *accel = ui::Accelerator(ui::VKEY_OEM_6, ui::EF_CONTROL_DOWN); 103 *accel = ui::Accelerator(ui::VKEY_OEM_6, ui::EF_CONTROL_DOWN);
104 return true; 104 return true;
105 105
106 case IDC_PRINT: 106 case IDC_PRINT:
107 *accel = ui::Accelerator(ui::VKEY_P, ui::EF_CONTROL_DOWN); 107 *accel = ui::Accelerator(ui::VKEY_P, ui::EF_CONTROL_DOWN);
108 return true; 108 return true;
109 109
110 case IDC_RELOAD:
111 *accel = ui::Accelerator(ui::VKEY_R, ui::EF_CONTROL_DOWN);
112 return true;
113
114 case IDC_VIEW_SOURCE:
115 *accel = ui::Accelerator(ui::VKEY_U, ui::EF_CONTROL_DOWN);
116 return true;
117
110 default: 118 default:
111 return false; 119 return false;
112 } 120 }
113 } 121 }
114 122
115 void RenderViewContextMenuViews::ExecuteCommand(int command_id, 123 void RenderViewContextMenuViews::ExecuteCommand(int command_id,
116 int event_flags) { 124 int event_flags) {
117 switch (command_id) { 125 switch (command_id) {
118 case IDC_WRITING_DIRECTION_DEFAULT: 126 case IDC_WRITING_DIRECTION_DEFAULT:
119 // WebKit's current behavior is for this menu item to always be disabled. 127 // WebKit's current behavior is for this menu item to always be disabled.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 WebContents::FromRenderFrameHost(GetRenderFrameHost()); 234 WebContents::FromRenderFrameHost(GetRenderFrameHost());
227 if (!web_contents) { 235 if (!web_contents) {
228 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents"; 236 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents";
229 return NULL; 237 return NULL;
230 } 238 }
231 return web_contents->GetFullscreenRenderWidgetHostView() 239 return web_contents->GetFullscreenRenderWidgetHostView()
232 ? web_contents->GetFullscreenRenderWidgetHostView() 240 ? web_contents->GetFullscreenRenderWidgetHostView()
233 ->GetNativeView() 241 ->GetNativeView()
234 : web_contents->GetNativeView(); 242 : web_contents->GetNativeView();
235 } 243 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698