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

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

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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
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 7
8 #if defined(TOOLKIT_GTK) 8 #if defined(TOOLKIT_GTK)
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #elif defined(OS_MACOSX) 10 #elif defined(OS_MACOSX)
11 #import <Cocoa/Cocoa.h> 11 #import <Cocoa/Cocoa.h>
12 #endif 12 #endif
13 13
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
16 16
17 #if defined(OS_MACOSX) 17 #if defined(OS_MACOSX)
18 @protocol RenderWidgetHostViewMacDelegate; 18 @protocol RenderWidgetHostViewMacDelegate;
19 #endif 19 #endif
20 20
21 namespace gfx { 21 namespace gfx {
22 class Size; 22 class Size;
23 } 23 }
24 24
25 namespace ui { 25 namespace ui {
26 class FocusStoreGtk; 26 class FocusStoreGtk;
27 } 27 }
28 28
29 namespace content { 29 namespace content {
30 30 class RenderFrameHost;
31 class RenderWidgetHost; 31 class RenderWidgetHost;
32 class WebDragDestDelegate; 32 class WebDragDestDelegate;
33 struct ContextMenuParams; 33 struct ContextMenuParams;
34 34
35 // This interface allows a client to extend the functionality of the 35 // This interface allows a client to extend the functionality of the
36 // WebContentsView implementation. 36 // WebContentsView implementation.
37 class CONTENT_EXPORT WebContentsViewDelegate { 37 class CONTENT_EXPORT WebContentsViewDelegate {
38 public: 38 public:
39 virtual ~WebContentsViewDelegate() {} 39 virtual ~WebContentsViewDelegate() {}
40 40
41 // Returns a delegate to process drags not handled by content. 41 // Returns a delegate to process drags not handled by content.
42 virtual WebDragDestDelegate* GetDragDestDelegate() = 0; 42 virtual WebDragDestDelegate* GetDragDestDelegate() = 0;
43 43
44 // Shows a context menu. 44 // Shows a context menu.
45 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; 45 virtual void ShowContextMenu(RenderFrameHost* render_frame_host,
46 const ContextMenuParams& params) = 0;
46 47
47 #if defined(OS_WIN) || defined(USE_AURA) 48 #if defined(OS_WIN) || defined(USE_AURA)
48 // These methods allow the embedder to intercept WebContentsViewWin's 49 // These methods allow the embedder to intercept WebContentsViewWin's
49 // implementation of these WebContentsView methods. See the WebContentsView 50 // implementation of these WebContentsView methods. See the WebContentsView
50 // interface documentation for more information about these methods. 51 // interface documentation for more information about these methods.
51 virtual void StoreFocus() = 0; 52 virtual void StoreFocus() = 0;
52 virtual void RestoreFocus() = 0; 53 virtual void RestoreFocus() = 0;
53 virtual bool Focus() = 0; 54 virtual bool Focus() = 0;
54 virtual void TakeFocus(bool reverse) = 0; 55 virtual void TakeFocus(bool reverse) = 0;
55 virtual void SizeChanged(const gfx::Size& size) = 0; 56 virtual void SizeChanged(const gfx::Size& size) = 0;
(...skipping 21 matching lines...) Expand all
77 // events on the responder chain. 78 // events on the responder chain.
78 virtual NSObject<RenderWidgetHostViewMacDelegate>* 79 virtual NSObject<RenderWidgetHostViewMacDelegate>*
79 CreateRenderWidgetHostViewDelegate( 80 CreateRenderWidgetHostViewDelegate(
80 RenderWidgetHost* render_widget_host) = 0; 81 RenderWidgetHost* render_widget_host) = 0;
81 #endif 82 #endif
82 }; 83 };
83 84
84 } // namespace content 85 } // namespace content
85 86
86 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_ 87 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698