| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
| 13 | 13 |
| 14 struct ContextMenuParams; | |
| 15 | 14 |
| 16 namespace content { | 15 namespace content { |
| 17 | 16 |
| 18 class TabContentsViewGtk; | 17 class TabContentsViewGtk; |
| 18 struct ContextMenuParams; |
| 19 | 19 |
| 20 // An object that supplies the Gtk parent of TabContentsViewGtk. Embedders may | 20 // An object that supplies the Gtk parent of TabContentsViewGtk. Embedders may |
| 21 // want to insert widgets that provide features that live with the | 21 // want to insert widgets that provide features that live with the |
| 22 // TabContentsViewGtk. | 22 // TabContentsViewGtk. |
| 23 class CONTENT_EXPORT TabContentsViewWrapperGtk { | 23 class CONTENT_EXPORT TabContentsViewWrapperGtk { |
| 24 public: | 24 public: |
| 25 // Initializes the TabContentsViewGtkWrapper by taking |view| and adding it | 25 // Initializes the TabContentsViewGtkWrapper by taking |view| and adding it |
| 26 // this object's GtkContainer. | 26 // this object's GtkContainer. |
| 27 virtual void WrapView(TabContentsViewGtk* view) = 0; | 27 virtual void WrapView(TabContentsViewGtk* view) = 0; |
| 28 | 28 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 40 // Gives TabContentsViewGtkWrapper a first chance at focus events from our | 40 // Gives TabContentsViewGtkWrapper a first chance at focus events from our |
| 41 // render widget host, before the main view invokes its default | 41 // render widget host, before the main view invokes its default |
| 42 // behaviour. Returns TRUE if |return_value| has been set and that value | 42 // behaviour. Returns TRUE if |return_value| has been set and that value |
| 43 // should be returned to GTK+. | 43 // should be returned to GTK+. |
| 44 virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget, | 44 virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget, |
| 45 GtkDirectionType type, | 45 GtkDirectionType type, |
| 46 gboolean* return_value) = 0; | 46 gboolean* return_value) = 0; |
| 47 | 47 |
| 48 // Complete hack because I have no idea where else to put this platform | 48 // Complete hack because I have no idea where else to put this platform |
| 49 // specific crud. | 49 // specific crud. |
| 50 virtual void ShowContextMenu(const ContextMenuParams& params) = 0; | 50 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; |
| 51 | 51 |
| 52 virtual ~TabContentsViewWrapperGtk() {} | 52 virtual ~TabContentsViewWrapperGtk() {} |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace content | 55 } // namespace content |
| 56 | 56 |
| 57 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ | 57 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ |
| OLD | NEW |