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

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

Issue 489763002: MacViews: Gets a webview working in views_examples_with_content_exe Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to master Created 6 years, 3 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_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_DELEGATE_H_
7
8 #if defined(OS_MACOSX)
9 #import <Cocoa/Cocoa.h>
10 #endif
11 7
12 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
13 #include "ui/gfx/native_widget_types.h"
14
15 #if defined(OS_MACOSX)
16 @protocol RenderWidgetHostViewMacDelegate;
17 #endif
18 9
19 namespace gfx { 10 namespace gfx {
20 class Size; 11 class Size;
21 } 12 }
22 13
23 namespace ui {
24 class FocusStoreGtk;
25 }
26
27 namespace content { 14 namespace content {
28 class RenderFrameHost; 15 class RenderFrameHost;
29 class RenderWidgetHost; 16 class WebContentsViewDelegateMac;
30 class WebDragDestDelegate; 17 class WebDragDestDelegate;
31 struct ContextMenuParams; 18 struct ContextMenuParams;
32 19
33 // This interface allows a client to extend the functionality of the 20 // This interface allows a client to extend the functionality of the
34 // WebContentsView implementation. 21 // WebContentsView implementation.
35 class CONTENT_EXPORT WebContentsViewDelegate { 22 class CONTENT_EXPORT WebContentsViewDelegate {
36 public: 23 public:
37 virtual ~WebContentsViewDelegate() {} 24 virtual ~WebContentsViewDelegate();
38 25
39 // Returns a delegate to process drags not handled by content. 26 // Returns a delegate to process drags not handled by content.
40 virtual WebDragDestDelegate* GetDragDestDelegate() = 0; 27 virtual WebDragDestDelegate* GetDragDestDelegate();
41 28
42 // Shows a context menu. 29 // Shows a context menu.
43 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, 30 virtual void ShowContextMenu(RenderFrameHost* render_frame_host,
44 const ContextMenuParams& params) = 0; 31 const ContextMenuParams& params);
45 32
46 #if defined(USE_AURA) 33 // These methods allow the embedder to intercept a WebContentsView's
47 // These methods allow the embedder to intercept WebContentsViewWin's 34 // implementation of these methods by returning true. See the WebContentsView
48 // implementation of these WebContentsView methods. See the WebContentsView
49 // interface documentation for more information about these methods. 35 // interface documentation for more information about these methods.
50 virtual void StoreFocus() = 0; 36 virtual bool StoreFocus();
51 virtual void RestoreFocus() = 0; 37 virtual bool RestoreFocus();
52 virtual bool Focus() = 0; 38 virtual bool Focus();
53 virtual void TakeFocus(bool reverse) = 0; 39 virtual bool TakeFocus(bool reverse);
54 virtual void SizeChanged(const gfx::Size& size) = 0; 40 virtual void SizeChanged(const gfx::Size& size);
55 #elif defined(OS_MACOSX) 41
56 // Returns a newly-created delegate for the RenderWidgetHostViewMac, to handle 42 // On Mac, returns a subclass that has additional Objective-C methods defined.
57 // events on the responder chain. 43 // Otherwise NULL.
58 virtual NSObject<RenderWidgetHostViewMacDelegate>* 44 virtual WebContentsViewDelegateMac* AsWebContentsViewDelegateMac();
59 CreateRenderWidgetHostViewDelegate(
60 RenderWidgetHost* render_widget_host) = 0;
61 #endif
62 }; 45 };
63 46
64 } // namespace content 47 } // namespace content
65 48
66 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_WIN_DELEGATE_H_ 49 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_VIEW_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/browser/web_contents_view_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698