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_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // The amount by which to indent the tabs on the sides (to make room for the | 132 // The amount by which to indent the tabs on the sides (to make room for the |
133 // red/yellow/green and incognito/fullscreen buttons). | 133 // red/yellow/green and incognito/fullscreen buttons). |
134 CGFloat leftIndentForControls_; | 134 CGFloat leftIndentForControls_; |
135 CGFloat rightIndentForControls_; | 135 CGFloat rightIndentForControls_; |
136 | 136 |
137 // Is the mouse currently inside the strip; | 137 // Is the mouse currently inside the strip; |
138 BOOL mouseInside_; | 138 BOOL mouseInside_; |
139 | 139 |
140 // Helper for performing tab selection as a result of dragging over a tab. | 140 // Helper for performing tab selection as a result of dragging over a tab. |
141 scoped_ptr<HoverTabSelector> hoverTabSelector_; | 141 scoped_ptr<HoverTabSelector> hoverTabSelector_; |
| 142 |
| 143 // A container view for the window controls, which must be manually added in |
| 144 // fullscreen in 10.10+. |
| 145 base::scoped_nsobject<NSView> fullscreenWindowControls_; |
142 } | 146 } |
143 | 147 |
144 @property(nonatomic) CGFloat leftIndentForControls; | 148 @property(nonatomic) CGFloat leftIndentForControls; |
145 @property(nonatomic) CGFloat rightIndentForControls; | 149 @property(nonatomic) CGFloat rightIndentForControls; |
146 | 150 |
147 // Initialize the controller with a view and browser that contains | 151 // Initialize the controller with a view and browser that contains |
148 // everything else we'll need. |switchView| is the view whose contents get | 152 // everything else we'll need. |switchView| is the view whose contents get |
149 // "switched" every time the user switches tabs. The children of this view | 153 // "switched" every time the user switches tabs. The children of this view |
150 // will be released, so if you want them to stay around, make sure | 154 // will be released, so if you want them to stay around, make sure |
151 // you have retained them. | 155 // you have retained them. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 245 |
242 // Default height for tabs. | 246 // Default height for tabs. |
243 + (CGFloat)defaultTabHeight; | 247 + (CGFloat)defaultTabHeight; |
244 | 248 |
245 // Default indentation for tabs (see |leftIndentForControls_|). | 249 // Default indentation for tabs (see |leftIndentForControls_|). |
246 + (CGFloat)defaultLeftIndentForControls; | 250 + (CGFloat)defaultLeftIndentForControls; |
247 | 251 |
248 // Returns the currently active TabContentsController. | 252 // Returns the currently active TabContentsController. |
249 - (TabContentsController*)activeTabContentsController; | 253 - (TabContentsController*)activeTabContentsController; |
250 | 254 |
| 255 // Adds traffic lights to the tab strip. Idempotent. |
| 256 - (void)addWindowControls; |
| 257 |
| 258 // Removes traffic lights from the tab strip. Idempotent. |
| 259 - (void)removeWindowControls; |
| 260 |
251 @end | 261 @end |
252 | 262 |
253 @interface TabStripController(TestingAPI) | 263 @interface TabStripController(TestingAPI) |
254 - (void)setTabTitle:(TabController*)tab | 264 - (void)setTabTitle:(TabController*)tab |
255 withContents:(content::WebContents*)contents; | 265 withContents:(content::WebContents*)contents; |
256 @end | 266 @end |
257 | 267 |
258 // Returns the parent view to use when showing a sheet for a given web contents. | 268 // Returns the parent view to use when showing a sheet for a given web contents. |
259 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents); | 269 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents); |
260 | 270 |
261 // Returns the bounds to use when showing a sheet for a given parent view. This | 271 // Returns the bounds to use when showing a sheet for a given parent view. This |
262 // returns a rect in window coordinates. | 272 // returns a rect in window coordinates. |
263 NSRect GetSheetParentBoundsForParentView(NSView* view); | 273 NSRect GetSheetParentBoundsForParentView(NSView* view); |
264 | 274 |
265 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 275 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |