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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 142 |
143 // A container view for the window controls, which must be manually added in | 143 // A container view for custom traffic light buttons, which must be manually |
144 // fullscreen in 10.10+. | 144 // added in fullscreen in 10.10+. |
145 base::scoped_nsobject<NSView> fullscreenWindowControls_; | 145 base::scoped_nsobject<NSView> customWindowControls_; |
146 } | 146 } |
147 | 147 |
148 @property(nonatomic) CGFloat leftIndentForControls; | 148 @property(nonatomic) CGFloat leftIndentForControls; |
149 @property(nonatomic) CGFloat rightIndentForControls; | 149 @property(nonatomic) CGFloat rightIndentForControls; |
150 | 150 |
151 // Initialize the controller with a view and browser that contains | 151 // Initialize the controller with a view and browser that contains |
152 // 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 |
153 // "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 |
154 // 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 |
155 // you have retained them. | 155 // you have retained them. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 245 |
246 // Default height for tabs. | 246 // Default height for tabs. |
247 + (CGFloat)defaultTabHeight; | 247 + (CGFloat)defaultTabHeight; |
248 | 248 |
249 // Default indentation for tabs (see |leftIndentForControls_|). | 249 // Default indentation for tabs (see |leftIndentForControls_|). |
250 + (CGFloat)defaultLeftIndentForControls; | 250 + (CGFloat)defaultLeftIndentForControls; |
251 | 251 |
252 // Returns the currently active TabContentsController. | 252 // Returns the currently active TabContentsController. |
253 - (TabContentsController*)activeTabContentsController; | 253 - (TabContentsController*)activeTabContentsController; |
254 | 254 |
255 // Adds traffic lights to the tab strip. Idempotent. | 255 // Adds custom traffic light buttons to the tab strip. Idempotent. |
256 - (void)addWindowControls; | 256 - (void)addCustomWindowControls; |
257 | 257 |
258 // Removes traffic lights from the tab strip. Idempotent. | 258 // Removes custom traffic light buttons from the tab strip. Idempotent. |
259 - (void)removeWindowControls; | 259 - (void)removeCustomWindowControls; |
260 | 260 |
261 @end | 261 @end |
262 | 262 |
263 @interface TabStripController(TestingAPI) | 263 @interface TabStripController(TestingAPI) |
264 - (void)setTabTitle:(TabController*)tab | 264 - (void)setTabTitle:(TabController*)tab |
265 withContents:(content::WebContents*)contents; | 265 withContents:(content::WebContents*)contents; |
266 @end | 266 @end |
267 | 267 |
268 // 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. |
269 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents); | 269 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents); |
270 | 270 |
271 // 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 |
272 // returns a rect in window coordinates. | 272 // returns a rect in window coordinates. |
273 NSRect GetSheetParentBoundsForParentView(NSView* view); | 273 NSRect GetSheetParentBoundsForParentView(NSView* view); |
274 | 274 |
275 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 275 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
OLD | NEW |