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

Side by Side Diff: chrome/browser/tab_contents/chrome_web_contents_view_delegate_mac.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
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_MAC_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_MAC_DELEGATE_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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "content/public/browser/web_contents_view_mac_delegate.h" 13 #include "content/public/browser/web_contents_view_delegate.h"
14 14
15 class RenderViewContextMenuMac; 15 class RenderViewContextMenuMac;
16 class WebDragBookmarkHandlerMac; 16 class WebDragBookmarkHandlerMac;
17 17
18 namespace content { 18 namespace content {
19 class WebContents; 19 class WebContents;
20 } 20 }
21 21
22 // A chrome/ specific class that extends WebContentsViewMac with features that 22 // A chrome/ specific class that extends WebContentsViewMac with features that
23 // live in chrome/. 23 // live in chrome/.
24 class ChromeWebContentsViewMacDelegate 24 class ChromeWebContentsViewDelegateMac
25 : public content::WebContentsViewMacDelegate { 25 : public content::WebContentsViewDelegate {
26 public: 26 public:
27 explicit ChromeWebContentsViewMacDelegate(content::WebContents* web_contents); 27 explicit ChromeWebContentsViewDelegateMac(content::WebContents* web_contents);
28 virtual ~ChromeWebContentsViewMacDelegate(); 28 virtual ~ChromeWebContentsViewDelegateMac();
29 29
30 // Overridden from WebContentsViewMacDelegate: 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* DragDelegate() 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; 37 virtual void NativeViewCreated(NSView* view) OVERRIDE;
38 virtual void NativeViewDestroyed(NSView* view) OVERRIDE; 38 virtual void NativeViewDestroyed(NSView* view) OVERRIDE;
39 39
40 private: 40 private:
41 // The context menu. Callbacks are asynchronous so we need to keep it around. 41 // The context menu. Callbacks are asynchronous so we need to keep it around.
42 scoped_ptr<RenderViewContextMenuMac> context_menu_; 42 scoped_ptr<RenderViewContextMenuMac> context_menu_;
43 43
44 // The chrome specific delegate that receives events from WebDragDestMac. 44 // The chrome specific delegate that receives events from WebDragDestMac.
45 scoped_ptr<WebDragBookmarkHandlerMac> bookmark_handler_; 45 scoped_ptr<WebDragBookmarkHandlerMac> bookmark_handler_;
46 46
47 // The WebContents that owns the view. 47 // The WebContents that owns the view.
48 content::WebContents* web_contents_; 48 content::WebContents* web_contents_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewMacDelegate); 50 DISALLOW_COPY_AND_ASSIGN(ChromeWebContentsViewDelegateMac);
51 }; 51 };
52 52
53 #endif // __OBJC__ 53 #endif // __OBJC__
54 54
55 namespace content { 55 namespace content {
56 class WebContents; 56 class WebContents;
57 class WebContentsViewMacDelegate; 57 class WebContentsViewMacDelegate;
58 } 58 }
59 59
60 namespace chrome_web_contents_view_mac_delegate { 60 namespace chrome_web_contents_view_delegate_mac {
61 // Creates a ChromeWebContentsViewMacDelegate. 61 // Creates a ChromeWebContentsViewDelegateMac.
62 content::WebContentsViewMacDelegate* CreateWebContentsViewMacDelegate( 62 content::WebContentsViewDelegate* CreateWebContentsViewDelegateMac(
63 content::WebContents* web_contents); 63 content::WebContents* web_contents);
64 } 64 }
65 65
66 #endif // CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_MAC_DELEGATE_H_ 66 #endif // CHROME_BROWSER_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698