| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <gtk/gtk.h> |
| 10 |
| 11 #include "ui/gfx/native_widget_types.h" |
| 12 |
| 13 class TabContentsViewGtk; |
| 14 class ContextMenuParams; |
| 15 |
| 16 // An object that supplies the Gtk parent of TabContentsViewGtk. Embedders may |
| 17 // want to insert widgets that provide features that live with the |
| 18 // TabContentsViewGtk. |
| 19 class TabContentsViewWrapperGtk { |
| 20 public: |
| 21 // Initializes the TabContentsViewGtkWrapper by taking |view| and adding it |
| 22 // this object's GtkContainer. |
| 23 virtual void WrapView(TabContentsViewGtk* view) = 0; |
| 24 |
| 25 // Returns the top widget that contains |view| passed in from WrapView. This |
| 26 // is exposed through TabContentsViewGtk::GetNativeView() when a wrapper is |
| 27 // supplied to a TabContentsViewGtk. |
| 28 virtual gfx::NativeView GetNativeView() const = 0; |
| 29 |
| 30 // Called during the TabContentsViewGtk. Used to associate drag handlers. |
| 31 virtual void OnCreateViewForWidget() = 0; |
| 32 |
| 33 // Handles a focus event from the renderer process. |
| 34 virtual void Focus() = 0; |
| 35 |
| 36 // Gives TabContentsViewGtkWrapper a first chance at focus events from our |
| 37 // render widget host, before the main view invokes its default |
| 38 // behaviour. Returns TRUE if |return_value| has been set and that value |
| 39 // should be returned to GTK+. |
| 40 virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget, |
| 41 GtkDirectionType type, |
| 42 gboolean* return_value) = 0; |
| 43 |
| 44 // Complete hack because I have no idea where else to put this platform |
| 45 // specific crud. |
| 46 virtual void ShowContextMenu(const ContextMenuParams& params) = 0; |
| 47 }; |
| 48 |
| 49 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ |
| OLD | NEW |