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

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

Issue 9705053: Remove tab_contents_view_gtk.h include from chrome. I tried to find a way to not have to expose the… (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/browser/tab_contents/tab_contents_view_gtk.cc ('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_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(TOOLKIT_USES_GTK) 9 #if defined(TOOLKIT_USES_GTK)
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
11 #elif defined(OS_MACOSX) 11 #elif defined(OS_MACOSX)
12 #import <Cocoa/Cocoa.h> 12 #import <Cocoa/Cocoa.h>
13 #endif 13 #endif
14 14
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 17
18 #if defined(OS_MACOSX) 18 #if defined(OS_MACOSX)
19 @protocol RenderWidgetHostViewMacDelegate; 19 @protocol RenderWidgetHostViewMacDelegate;
20 #endif 20 #endif
21 21
22 namespace gfx { 22 namespace gfx {
23 class Size; 23 class Size;
24 } 24 }
25 25
26 namespace ui {
27 class FocusStoreGtk;
28 }
29
26 namespace content { 30 namespace content {
27 31
28 class RenderWidgetHost; 32 class RenderWidgetHost;
29 class WebDragDestDelegate; 33 class WebDragDestDelegate;
30 struct ContextMenuParams; 34 struct ContextMenuParams;
31 35
32 // This interface allows a client to extend the functionality of the 36 // This interface allows a client to extend the functionality of the
33 // WebContentsView implementation. 37 // WebContentsView implementation.
34 class CONTENT_EXPORT WebContentsViewDelegate { 38 class CONTENT_EXPORT WebContentsViewDelegate {
35 public: 39 public:
36 virtual ~WebContentsViewDelegate() {} 40 virtual ~WebContentsViewDelegate() {}
37 41
38 // Returns a delegate to process drags not handled by content. 42 // Returns a delegate to process drags not handled by content.
39 virtual WebDragDestDelegate* GetDragDestDelegate() = 0; 43 virtual WebDragDestDelegate* GetDragDestDelegate() = 0;
40 44
41 // Shows a context menu. 45 // Shows a context menu.
42 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; 46 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
43 47
44 #if defined(OS_WIN) && !defined(USE_AURA) 48 #if defined(OS_WIN) && !defined(USE_AURA)
45 // These methods allow the embedder to intercept WebContentsViewWin's 49 // These methods allow the embedder to intercept WebContentsViewWin's
46 // implementation of these WebContentsView methods. See the WebContentsView 50 // implementation of these WebContentsView methods. See the WebContentsView
47 // interface documentation for more information about these methods. 51 // interface documentation for more information about these methods.
48 virtual void StoreFocus() = 0; 52 virtual void StoreFocus() = 0;
49 virtual void RestoreFocus() = 0; 53 virtual void RestoreFocus() = 0;
50 virtual bool Focus() = 0; 54 virtual bool Focus() = 0;
51 virtual void TakeFocus(bool reverse) = 0; 55 virtual void TakeFocus(bool reverse) = 0;
52 virtual void SizeChanged(const gfx::Size& size) = 0; 56 virtual void SizeChanged(const gfx::Size& size) = 0;
53 #elif defined(TOOLKIT_USES_GTK) 57 #elif defined(TOOLKIT_USES_GTK)
54 // Initializes the WebContentsViewDelegate. 58 // Initializes the WebContentsViewDelegate.
55 virtual void Initialize(GtkWidget* expanded_container) = 0; 59 virtual void Initialize(GtkWidget* expanded_container,
60 ui::FocusStoreGtk* focus_store) = 0;
56 61
57 // Returns the top widget that contains |view| passed in from WrapView. This 62 // Returns the top widget that contains |view| passed in from WrapView. This
58 // is exposed through TabContentsViewGtk::GetNativeView() when a wrapper is 63 // is exposed through TabContentsViewGtk::GetNativeView() when a wrapper is
59 // supplied to a TabContentsViewGtk. 64 // supplied to a TabContentsViewGtk.
60 virtual gfx::NativeView GetNativeView() const = 0; 65 virtual gfx::NativeView GetNativeView() const = 0;
61 66
62 // Handles a focus event from the renderer process. 67 // Handles a focus event from the renderer process.
63 virtual void Focus() = 0; 68 virtual void Focus() = 0;
64 69
65 // Gives the delegate a first chance at focus events from our render widget 70 // Gives the delegate a first chance at focus events from our render widget
(...skipping 11 matching lines...) Expand all
77 82
78 // Notifications that the native view was created/destroyed. 83 // Notifications that the native view was created/destroyed.
79 virtual void NativeViewCreated(NSView* view) = 0; 84 virtual void NativeViewCreated(NSView* view) = 0;
80 virtual void NativeViewDestroyed(NSView* view) = 0; 85 virtual void NativeViewDestroyed(NSView* view) = 0;
81 #endif 86 #endif
82 }; 87 };
83 88
84 } // namespace content 89 } // namespace content
85 90
86 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_ 91 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents_view_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698