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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
13 #include "chrome/browser/ui/browser_finder.h" | 13 #include "chrome/browser/ui/browser_finder.h" |
14 #include "chrome/browser/ui/views/frame/browser_view.h" | 14 #include "chrome/browser/ui/views/frame/browser_view.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
16 #include "chrome/grit/generated_resources.h" | |
17 #include "components/renderer_context_menu/views/toolkit_delegate_views.h" | 16 #include "components/renderer_context_menu/views/toolkit_delegate_views.h" |
18 #include "content/public/browser/render_view_host.h" | 17 #include "content/public/browser/render_view_host.h" |
19 #include "content/public/browser/render_widget_host.h" | 18 #include "content/public/browser/render_widget_host.h" |
20 #include "content/public/browser/render_widget_host_view.h" | 19 #include "content/public/browser/render_widget_host_view.h" |
21 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
22 #include "ui/aura/client/screen_position_client.h" | 21 #include "ui/aura/client/screen_position_client.h" |
23 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
24 #include "ui/base/accelerators/accelerator.h" | 23 #include "ui/base/accelerators/accelerator.h" |
25 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
26 #include "ui/events/keycodes/keyboard_codes.h" | 25 #include "ui/events/keycodes/keyboard_codes.h" |
| 26 #include "ui/strings/grit/ui_strings.h" |
27 #include "ui/views/widget/widget.h" | 27 #include "ui/views/widget/widget.h" |
28 | 28 |
29 using content::WebContents; | 29 using content::WebContents; |
30 | 30 |
31 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
32 // RenderViewContextMenuViews, public: | 32 // RenderViewContextMenuViews, public: |
33 | 33 |
34 RenderViewContextMenuViews::RenderViewContextMenuViews( | 34 RenderViewContextMenuViews::RenderViewContextMenuViews( |
35 content::RenderFrameHost* render_frame_host, | 35 content::RenderFrameHost* render_frame_host, |
36 const content::ContextMenuParams& params) | 36 const content::ContextMenuParams& params) |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 WebContents::FromRenderFrameHost(GetRenderFrameHost()); | 292 WebContents::FromRenderFrameHost(GetRenderFrameHost()); |
293 if (!web_contents) { | 293 if (!web_contents) { |
294 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents"; | 294 LOG(ERROR) << "RenderViewContextMenuViews::Show, couldn't find WebContents"; |
295 return NULL; | 295 return NULL; |
296 } | 296 } |
297 return web_contents->GetFullscreenRenderWidgetHostView() | 297 return web_contents->GetFullscreenRenderWidgetHostView() |
298 ? web_contents->GetFullscreenRenderWidgetHostView() | 298 ? web_contents->GetFullscreenRenderWidgetHostView() |
299 ->GetNativeView() | 299 ->GetNativeView() |
300 : web_contents->GetNativeView(); | 300 : web_contents->GetNativeView(); |
301 } | 301 } |
OLD | NEW |