OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 return true; | 112 return true; |
113 | 113 |
114 case IDC_PRINT: | 114 case IDC_PRINT: |
115 *accel = ui::Accelerator(ui::VKEY_P, ui::EF_CONTROL_DOWN); | 115 *accel = ui::Accelerator(ui::VKEY_P, ui::EF_CONTROL_DOWN); |
116 return true; | 116 return true; |
117 | 117 |
118 case IDC_RELOAD: | 118 case IDC_RELOAD: |
119 *accel = ui::Accelerator(ui::VKEY_R, ui::EF_CONTROL_DOWN); | 119 *accel = ui::Accelerator(ui::VKEY_R, ui::EF_CONTROL_DOWN); |
120 return true; | 120 return true; |
121 | 121 |
| 122 case IDC_CONTENT_CONTEXT_SAVEAVAS: |
122 case IDC_SAVE_PAGE: | 123 case IDC_SAVE_PAGE: |
123 *accel = ui::Accelerator(ui::VKEY_S, ui::EF_CONTROL_DOWN); | 124 *accel = ui::Accelerator(ui::VKEY_S, ui::EF_CONTROL_DOWN); |
124 return true; | 125 return true; |
125 | 126 |
126 case IDC_VIEW_SOURCE: | 127 case IDC_VIEW_SOURCE: |
127 *accel = ui::Accelerator(ui::VKEY_U, ui::EF_CONTROL_DOWN); | 128 *accel = ui::Accelerator(ui::VKEY_U, ui::EF_CONTROL_DOWN); |
128 return true; | 129 return true; |
129 | 130 |
130 default: | 131 default: |
131 return false; | 132 return false; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 WebContents::FromRenderFrameHost(GetRenderFrameHost()); | 247 WebContents::FromRenderFrameHost(GetRenderFrameHost()); |
247 if (!web_contents) { | 248 if (!web_contents) { |
248 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents"; | 249 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents"; |
249 return NULL; | 250 return NULL; |
250 } | 251 } |
251 return web_contents->GetFullscreenRenderWidgetHostView() | 252 return web_contents->GetFullscreenRenderWidgetHostView() |
252 ? web_contents->GetFullscreenRenderWidgetHostView() | 253 ? web_contents->GetFullscreenRenderWidgetHostView() |
253 ->GetNativeView() | 254 ->GetNativeView() |
254 : web_contents->GetNativeView(); | 255 : web_contents->GetNativeView(); |
255 } | 256 } |
OLD | NEW |