Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: content/public/browser/web_contents_view_gtk_delegate.h

Issue 9586009: Move TabContentsViewGtk's delegate to content\public\browser. Also name it a delegate instead of a … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_WRAPPER_GTK_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_GTK_DELEGATE_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 14
15 namespace content { 15 namespace content {
16 16
17 class TabContentsViewGtk; 17 class TabContentsViewGtk;
18 struct ContextMenuParams; 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 WebContentsViewGtkDelegate {
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
29 // Returns the top widget that contains |view| passed in from WrapView. This 29 // Returns the top widget that contains |view| passed in from WrapView. This
30 // is exposed through TabContentsViewGtk::GetNativeView() when a wrapper is 30 // is exposed through TabContentsViewGtk::GetNativeView() when a wrapper is
31 // supplied to a TabContentsViewGtk. 31 // supplied to a TabContentsViewGtk.
32 virtual gfx::NativeView GetNativeView() const = 0; 32 virtual gfx::NativeView GetNativeView() const = 0;
33 33
34 // Called during the TabContentsViewGtk. Used to associate drag handlers. 34 // Called during the TabContentsViewGtk. Used to associate drag handlers.
35 virtual void OnCreateViewForWidget() = 0; 35 virtual void OnCreateViewForWidget() = 0;
36 36
37 // Handles a focus event from the renderer process. 37 // Handles a focus event from the renderer process.
38 virtual void Focus() = 0; 38 virtual void Focus() = 0;
39 39
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 content::ContextMenuParams& params) = 0; 50 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
51 51
52 virtual ~TabContentsViewWrapperGtk() {} 52 virtual ~WebContentsViewGtkDelegate() {}
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_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698