OLD | NEW |
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 CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(__OBJC__) | 9 #if defined(__OBJC__) |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 explicit ChromeWebContentsViewDelegateMac(content::WebContents* web_contents); | 27 explicit ChromeWebContentsViewDelegateMac(content::WebContents* web_contents); |
28 virtual ~ChromeWebContentsViewDelegateMac(); | 28 virtual ~ChromeWebContentsViewDelegateMac(); |
29 | 29 |
30 // Overridden from WebContentsViewDelegate: | 30 // Overridden from WebContentsViewDelegate: |
31 virtual NSObject<RenderWidgetHostViewMacDelegate>* | 31 virtual NSObject<RenderWidgetHostViewMacDelegate>* |
32 CreateRenderWidgetHostViewDelegate( | 32 CreateRenderWidgetHostViewDelegate( |
33 content::RenderWidgetHost* render_widget_host) OVERRIDE; | 33 content::RenderWidgetHost* render_widget_host) OVERRIDE; |
34 virtual content::WebDragDestDelegate* GetDragDestDelegate() OVERRIDE; | 34 virtual content::WebDragDestDelegate* GetDragDestDelegate() OVERRIDE; |
35 virtual void ShowContextMenu( | 35 virtual void ShowContextMenu( |
36 const content::ContextMenuParams& params) OVERRIDE; | 36 const content::ContextMenuParams& params) OVERRIDE; |
37 virtual void NativeViewCreated(NSView* view) OVERRIDE; | |
38 virtual void NativeViewDestroyed(NSView* view) OVERRIDE; | |
39 | 37 |
40 private: | 38 private: |
41 // The context menu. Callbacks are asynchronous so we need to keep it around. | 39 // The context menu. Callbacks are asynchronous so we need to keep it around. |
42 scoped_ptr<RenderViewContextMenuMac> context_menu_; | 40 scoped_ptr<RenderViewContextMenuMac> context_menu_; |
43 | 41 |
44 // The chrome specific delegate that receives events from WebDragDestMac. | 42 // The chrome specific delegate that receives events from WebDragDestMac. |
45 scoped_ptr<WebDragBookmarkHandlerMac> bookmark_handler_; | 43 scoped_ptr<WebDragBookmarkHandlerMac> bookmark_handler_; |
46 | 44 |
47 // The WebContents that owns the view. | 45 // The WebContents that owns the view. |
48 content::WebContents* web_contents_; | 46 content::WebContents* web_contents_; |
49 | 47 |
50 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateMac); | 48 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateMac); |
51 }; | 49 }; |
52 | 50 |
53 #endif // __OBJC__ | 51 #endif // __OBJC__ |
54 | 52 |
55 namespace content { | 53 namespace content { |
56 class WebContents; | 54 class WebContents; |
57 class WebContentsViewMacDelegate; | 55 class WebContentsViewMacDelegate; |
58 } | 56 } |
59 | 57 |
60 namespace chrome_web_contents_view_delegate_mac { | 58 namespace chrome_web_contents_view_delegate_mac { |
61 // Creates a ChromeWebContentsViewDelegateMac. | 59 // Creates a ChromeWebContentsViewDelegateMac. |
62 content::WebContentsViewDelegate* CreateWebContentsViewDelegateMac( | 60 content::WebContentsViewDelegate* CreateWebContentsViewDelegateMac( |
63 content::WebContents* web_contents); | 61 content::WebContents* web_contents); |
64 } | 62 } |
65 | 63 |
66 #endif // CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_ | 64 #endif // CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_ |
OLD | NEW |