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

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

Issue 9700023: Move creation of content TabContentsViews to content so that we can hide these headers through DEPS… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_
7 #pragma once
8
9 #include <gtk/gtk.h>
10
11 #include "content/common/content_export.h"
12 #include "ui/gfx/native_widget_types.h"
13
14
15 namespace content {
16
17 class TabContentsViewGtk;
18 struct ContextMenuParams;
19
20 // An object that supplies the Gtk parent of TabContentsViewGtk. Embedders may
21 // want to insert widgets that provide features that live with the
22 // TabContentsViewGtk.
23 class CONTENT_EXPORT WebContentsViewGtkDelegate {
24 public:
25 // Initializes the WebContentsViewGtkDelegate by taking |view| and adding it
26 // this object's GtkContainer.
27 virtual void WrapView(TabContentsViewGtk* view) = 0;
28
29 // Returns the top widget that contains |view| passed in from WrapView. This
30 // is exposed through TabContentsViewGtk::GetNativeView() when a wrapper is
31 // supplied to a TabContentsViewGtk.
32 virtual gfx::NativeView GetNativeView() const = 0;
33
34 // Called during the TabContentsViewGtk. Used to associate drag handlers.
35 virtual void OnCreateViewForWidget() = 0;
36
37 // Handles a focus event from the renderer process.
38 virtual void Focus() = 0;
39
40 // Gives WebContentsViewGtkDelegate a first chance at focus events from our
41 // render widget host, before the main view invokes its default
42 // behaviour. Returns TRUE if |return_value| has been set and that value
43 // should be returned to GTK+.
44 virtual gboolean OnNativeViewFocusEvent(GtkWidget* widget,
45 GtkDirectionType type,
46 gboolean* return_value) = 0;
47
48 // Complete hack because I have no idea where else to put this platform
49 // specific crud.
50 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
51
52 virtual ~WebContentsViewGtkDelegate() {}
53 };
54
55 } // namespace content
56
57 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_GTK_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698