OLD | NEW |
1 // Copyright (c) 2011 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_TAB_CONTENTS_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(__OBJC__) | 9 #if defined(__OBJC__) |
10 | 10 |
11 #import <Cocoa/Cocoa.h> | 11 #import <Cocoa/Cocoa.h> |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/memory/scoped_nsobject.h" | 16 #include "base/memory/scoped_nsobject.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | |
19 #include "content/browser/tab_contents/tab_contents_view.h" | 18 #include "content/browser/tab_contents/tab_contents_view.h" |
| 19 #include "content/browser/tab_contents/tab_contents_view_helper.h" |
20 #include "ui/base/cocoa/base_view.h" | 20 #include "ui/base/cocoa/base_view.h" |
21 #include "ui/gfx/size.h" | 21 #include "ui/gfx/size.h" |
22 | 22 |
23 @class FocusTracker; | 23 @class FocusTracker; |
24 class RenderViewContextMenuMac; | 24 class RenderViewContextMenuMac; |
25 @class SadTabController; | 25 @class SadTabController; |
26 class SkBitmap; | 26 class SkBitmap; |
27 class TabContentsViewMac; | 27 class TabContentsViewMac; |
28 class WebDragBookmarkHandlerMac; | 28 class WebDragBookmarkHandlerMac; |
29 @class WebDragDest; | 29 @class WebDragDest; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // CloseTabAfterEventTracking() implementation. | 118 // CloseTabAfterEventTracking() implementation. |
119 void CloseTab(); | 119 void CloseTab(); |
120 | 120 |
121 TabContents* tab_contents() { return tab_contents_; } | 121 TabContents* tab_contents() { return tab_contents_; } |
122 int preferred_width() const { return preferred_width_; } | 122 int preferred_width() const { return preferred_width_; } |
123 | 123 |
124 private: | 124 private: |
125 // The TabContents whose contents we display. | 125 // The TabContents whose contents we display. |
126 TabContents* tab_contents_; | 126 TabContents* tab_contents_; |
127 | 127 |
128 // Common implementations of some RenderViewHostDelegate::View methods. | 128 // Common implementations of some TabContentsView methods. |
129 RenderViewHostDelegateViewHelper delegate_view_helper_; | 129 TabContentsViewHelper tab_contents_view_helper_; |
130 | 130 |
131 // The Cocoa NSView that lives in the view hierarchy. | 131 // The Cocoa NSView that lives in the view hierarchy. |
132 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; | 132 scoped_nsobject<TabContentsViewCocoa> cocoa_view_; |
133 | 133 |
134 // Keeps track of which NSView has focus so we can restore the focus when | 134 // Keeps track of which NSView has focus so we can restore the focus when |
135 // focus returns. | 135 // focus returns. |
136 scoped_nsobject<FocusTracker> focus_tracker_; | 136 scoped_nsobject<FocusTracker> focus_tracker_; |
137 | 137 |
138 // The context menu. Callbacks are asynchronous so we need to keep it around. | 138 // The context menu. Callbacks are asynchronous so we need to keep it around. |
139 scoped_ptr<RenderViewContextMenuMac> context_menu_; | 139 scoped_ptr<RenderViewContextMenuMac> context_menu_; |
(...skipping 12 matching lines...) Expand all Loading... |
152 | 152 |
153 // Functions that may be accessed from non-Objective-C C/C++ code. | 153 // Functions that may be accessed from non-Objective-C C/C++ code. |
154 class TabContents; | 154 class TabContents; |
155 class TabContentsView; | 155 class TabContentsView; |
156 | 156 |
157 namespace tab_contents_view_mac { | 157 namespace tab_contents_view_mac { |
158 TabContentsView* CreateTabContentsView(TabContents* tab_contents); | 158 TabContentsView* CreateTabContentsView(TabContents* tab_contents); |
159 } | 159 } |
160 | 160 |
161 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ | 161 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_VIEW_MAC_H_ |
OLD | NEW |