OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/shell_web_contents_view_delegate.h" | 5 #include "content/shell/browser/shell_web_contents_view_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/browser/render_process_host.h" | 8 #include "content/public/browser/render_process_host.h" |
9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
10 #include "content/public/browser/render_widget_host_view.h" | 10 #include "content/public/browser/render_widget_host_view.h" |
11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
12 #include "content/public/browser/web_contents_view.h" | 12 #include "content/public/browser/web_contents_view.h" |
13 #include "content/public/common/context_menu_params.h" | 13 #include "content/public/common/context_menu_params.h" |
14 #include "content/shell/browser/shell.h" | 14 #include "content/shell/browser/shell.h" |
15 #include "content/shell/browser/shell_browser_context.h" | 15 #include "content/shell/browser/shell_browser_context.h" |
16 #include "content/shell/browser/shell_browser_main_parts.h" | 16 #include "content/shell/browser/shell_browser_main_parts.h" |
17 #include "content/shell/browser/shell_content_browser_client.h" | 17 #include "content/shell/browser/shell_content_browser_client.h" |
18 #include "content/shell/browser/shell_devtools_frontend.h" | 18 #include "content/shell/browser/shell_devtools_frontend.h" |
19 #include "content/shell/browser/shell_web_contents_view_delegate_creator.h" | 19 #include "content/shell/browser/shell_web_contents_view_delegate_creator.h" |
20 #include "content/shell/common/shell_switches.h" | 20 #include "content/shell/common/shell_switches.h" |
21 #include "third_party/WebKit/public/web/WebContextMenuData.h" | 21 #include "third_party/WebKit/public/web/WebContextMenuData.h" |
22 #include "ui/base/gtk/focus_store_gtk.h" | 22 #include "ui/base/gtk/focus_store_gtk.h" |
23 #include "ui/base/gtk/gtk_floating_container.h" | 23 #include "ui/base/gtk/gtk_floating_container.h" |
24 | 24 |
25 using WebKit::WebContextMenuData; | 25 using blink::WebContextMenuData; |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 WebContentsViewDelegate* CreateShellWebContentsViewDelegate( | 29 WebContentsViewDelegate* CreateShellWebContentsViewDelegate( |
30 WebContents* web_contents) { | 30 WebContents* web_contents) { |
31 return new ShellWebContentsViewDelegate(web_contents); | 31 return new ShellWebContentsViewDelegate(web_contents); |
32 } | 32 } |
33 | 33 |
34 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( | 34 ShellWebContentsViewDelegate::ShellWebContentsViewDelegate( |
35 WebContents* web_contents) | 35 WebContents* web_contents) |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 232 |
233 void ShellWebContentsViewDelegate::OnDeleteMenuActivated(GtkWidget* widget) { | 233 void ShellWebContentsViewDelegate::OnDeleteMenuActivated(GtkWidget* widget) { |
234 web_contents_->GetRenderViewHost()->Delete(); | 234 web_contents_->GetRenderViewHost()->Delete(); |
235 } | 235 } |
236 | 236 |
237 void ShellWebContentsViewDelegate::OnInspectMenuActivated(GtkWidget* widget) { | 237 void ShellWebContentsViewDelegate::OnInspectMenuActivated(GtkWidget* widget) { |
238 ShellDevToolsFrontend::Show(web_contents_); | 238 ShellDevToolsFrontend::Show(web_contents_); |
239 } | 239 } |
240 | 240 |
241 } // namespace content | 241 } // namespace content |
OLD | NEW |