| 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 #ifndef CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ |
| 6 #define CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 #include "content/public/browser/web_contents_view_delegate.h" | 9 #include "content/public/browser/web_contents_view_delegate.h" |
| 10 #include "content/public/common/context_menu_params.h" | 10 #include "content/public/common/context_menu_params.h" |
| 11 | 11 |
| 12 #if defined(TOOLKIT_GTK) | 12 #if defined(TOOLKIT_GTK) |
| 13 #include "ui/base/gtk/gtk_signal.h" | 13 #include "ui/base/gtk/gtk_signal.h" |
| 14 #include "ui/base/gtk/owned_widget_gtk.h" | 14 #include "ui/base/gtk/owned_widget_gtk.h" |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class ShellWebContentsViewDelegate : public WebContentsViewDelegate { | 19 class ShellWebContentsViewDelegate : public WebContentsViewDelegate { |
| 20 public: | 20 public: |
| 21 explicit ShellWebContentsViewDelegate(WebContents* web_contents); | 21 explicit ShellWebContentsViewDelegate(WebContents* web_contents); |
| 22 virtual ~ShellWebContentsViewDelegate(); | 22 virtual ~ShellWebContentsViewDelegate(); |
| 23 | 23 |
| 24 // Overridden from WebContentsViewDelegate: | 24 // Overridden from WebContentsViewDelegate: |
| 25 virtual void ShowContextMenu(const ContextMenuParams& params) OVERRIDE; | 25 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, |
| 26 const ContextMenuParams& params) OVERRIDE; |
| 26 virtual WebDragDestDelegate* GetDragDestDelegate() OVERRIDE; | 27 virtual WebDragDestDelegate* GetDragDestDelegate() OVERRIDE; |
| 27 | 28 |
| 28 #if defined(TOOLKIT_GTK) | 29 #if defined(TOOLKIT_GTK) |
| 29 virtual void Initialize(GtkWidget* expanded_container, | 30 virtual void Initialize(GtkWidget* expanded_container, |
| 30 ui::FocusStoreGtk* focus_store) OVERRIDE; | 31 ui::FocusStoreGtk* focus_store) OVERRIDE; |
| 31 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 32 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 32 virtual void Focus() OVERRIDE; | 33 virtual void Focus() OVERRIDE; |
| 33 virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget, | 34 virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget, |
| 34 GtkDirectionType type, | 35 GtkDirectionType type, |
| 35 gboolean* return_value) OVERRIDE; | 36 gboolean* return_value) OVERRIDE; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void, | 75 CHROMEGTK_CALLBACK_0(ShellWebContentsViewDelegate, void, |
| 75 OnInspectMenuActivated); | 76 OnInspectMenuActivated); |
| 76 #endif | 77 #endif |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(ShellWebContentsViewDelegate); | 79 DISALLOW_COPY_AND_ASSIGN(ShellWebContentsViewDelegate); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace content | 82 } // namespace content |
| 82 | 83 |
| 83 #endif // CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ | 84 #endif // CONTENT_SHELL_BROWSER_SHELL_WEB_CONTENTS_VIEW_DELEGATE_H_ |
| OLD | NEW |