| 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 <memory> | 10 #include <memory> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 // Array of subviews which are permanent (and which should never be removed), | 137 // Array of subviews which are permanent (and which should never be removed), |
| 138 // such as the new-tab button, but *not* the tabs themselves. | 138 // such as the new-tab button, but *not* the tabs themselves. |
| 139 base::scoped_nsobject<NSMutableArray> permanentSubviews_; | 139 base::scoped_nsobject<NSMutableArray> permanentSubviews_; |
| 140 | 140 |
| 141 // The default favicon, so we can use one copy for all buttons. | 141 // The default favicon, so we can use one copy for all buttons. |
| 142 base::scoped_nsobject<NSImage> defaultFavicon_; | 142 base::scoped_nsobject<NSImage> defaultFavicon_; |
| 143 | 143 |
| 144 // The amount by which to indent the tabs on the sides (to make room for the | 144 // The amount by which to indent the tabs on the sides (to make room for the |
| 145 // red/yellow/green and incognito/fullscreen buttons). | 145 // red/yellow/green and incognito/fullscreen buttons). |
| 146 CGFloat leftIndentForControls_; | 146 CGFloat leadingIndentForControls_; |
| 147 CGFloat rightIndentForControls_; | 147 CGFloat trailingIndentForControls_; |
| 148 | 148 |
| 149 // Is the mouse currently inside the strip; | 149 // Is the mouse currently inside the strip; |
| 150 BOOL mouseInside_; | 150 BOOL mouseInside_; |
| 151 | 151 |
| 152 // Helper for performing tab selection as a result of dragging over a tab. | 152 // Helper for performing tab selection as a result of dragging over a tab. |
| 153 std::unique_ptr<HoverTabSelector> hoverTabSelector_; | 153 std::unique_ptr<HoverTabSelector> hoverTabSelector_; |
| 154 | 154 |
| 155 // A container view for custom traffic light buttons, which must be manually | 155 // A container view for custom traffic light buttons, which must be manually |
| 156 // added in fullscreen in 10.10+. | 156 // added in fullscreen in 10.10+. |
| 157 base::scoped_nsobject<CustomWindowControlsView> customWindowControls_; | 157 base::scoped_nsobject<CustomWindowControlsView> customWindowControls_; |
| 158 base::scoped_nsobject<CrTrackingArea> customWindowControlsTrackingArea_; | 158 base::scoped_nsobject<CrTrackingArea> customWindowControlsTrackingArea_; |
| 159 } | 159 } |
| 160 | 160 |
| 161 @property(nonatomic) CGFloat leftIndentForControls; | 161 @property(nonatomic) CGFloat leadingIndentForControls; |
| 162 @property(nonatomic) CGFloat rightIndentForControls; | 162 @property(nonatomic) CGFloat trailingIndentForControls; |
| 163 | 163 |
| 164 @property(assign, nonatomic) TabView* hoveredTab; | 164 @property(assign, nonatomic) TabView* hoveredTab; |
| 165 | 165 |
| 166 // Initialize the controller with a view and browser that contains | 166 // Initialize the controller with a view and browser that contains |
| 167 // everything else we'll need. |switchView| is the view whose contents get | 167 // everything else we'll need. |switchView| is the view whose contents get |
| 168 // "switched" every time the user switches tabs. The children of this view | 168 // "switched" every time the user switches tabs. The children of this view |
| 169 // will be released, so if you want them to stay around, make sure | 169 // will be released, so if you want them to stay around, make sure |
| 170 // you have retained them. | 170 // you have retained them. |
| 171 // |delegate| is the one listening to filtered TabStripModelObserverBridge's | 171 // |delegate| is the one listening to filtered TabStripModelObserverBridge's |
| 172 // events (see TabStripControllerDelegate for more details). | 172 // events (see TabStripControllerDelegate for more details). |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // closure. | 258 // closure. |
| 259 - (BOOL)inRapidClosureMode; | 259 - (BOOL)inRapidClosureMode; |
| 260 | 260 |
| 261 // Returns YES if the user is allowed to drag tabs on the strip at this moment. | 261 // Returns YES if the user is allowed to drag tabs on the strip at this moment. |
| 262 // For example, this returns NO if there are any pending tab close animtations. | 262 // For example, this returns NO if there are any pending tab close animtations. |
| 263 - (BOOL)tabDraggingAllowed; | 263 - (BOOL)tabDraggingAllowed; |
| 264 | 264 |
| 265 // Default height for tabs. | 265 // Default height for tabs. |
| 266 + (CGFloat)defaultTabHeight; | 266 + (CGFloat)defaultTabHeight; |
| 267 | 267 |
| 268 // Default indentation for tabs (see |leftIndentForControls_|). | 268 // Default indentation for tabs (see |leadingIndentForControls_|). |
| 269 + (CGFloat)defaultLeftIndentForControls; | 269 + (CGFloat)defaultLeadingIndentForControls; |
| 270 | 270 |
| 271 // Returns the amount by which tabs overlap. | 271 // Returns the amount by which tabs overlap. |
| 272 + (CGFloat)tabOverlap; | 272 + (CGFloat)tabOverlap; |
| 273 | 273 |
| 274 // Returns the currently active TabContentsController. | 274 // Returns the currently active TabContentsController. |
| 275 - (TabContentsController*)activeTabContentsController; | 275 - (TabContentsController*)activeTabContentsController; |
| 276 | 276 |
| 277 // Adds custom traffic light buttons to the tab strip. Idempotent. | 277 // Adds custom traffic light buttons to the tab strip. Idempotent. |
| 278 - (void)addCustomWindowControls; | 278 - (void)addCustomWindowControls; |
| 279 | 279 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 298 // consumption. This is used to disable effects when fullscreen. | 298 // consumption. This is used to disable effects when fullscreen. |
| 299 - (void)setVisualEffectsDisabledForFullscreen:(BOOL)disabled; | 299 - (void)setVisualEffectsDisabledForFullscreen:(BOOL)disabled; |
| 300 @end | 300 @end |
| 301 | 301 |
| 302 @interface TabStripController(TestingAPI) | 302 @interface TabStripController(TestingAPI) |
| 303 - (void)setTabTitle:(TabController*)tab | 303 - (void)setTabTitle:(TabController*)tab |
| 304 withContents:(content::WebContents*)contents; | 304 withContents:(content::WebContents*)contents; |
| 305 @end | 305 @end |
| 306 | 306 |
| 307 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 307 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
| OLD | NEW |