| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 @class TabModel; | 10 @class TabModel; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 extern NSString* const kTabStripDragEnded; | 27 extern NSString* const kTabStripDragEnded; |
| 28 | 28 |
| 29 // Controller class for the tabstrip. Manages displaying tabs and keeping the | 29 // Controller class for the tabstrip. Manages displaying tabs and keeping the |
| 30 // display in sync with the TabModel. This controller is only instantiated on | 30 // display in sync with the TabModel. This controller is only instantiated on |
| 31 // tablet. The tab strip view itself is a subclass of UIScrollView, which | 31 // tablet. The tab strip view itself is a subclass of UIScrollView, which |
| 32 // manages scroll offsets and scroll animations. | 32 // manages scroll offsets and scroll animations. |
| 33 @interface TabStripController : NSObject | 33 @interface TabStripController : NSObject |
| 34 | 34 |
| 35 @property(nonatomic, assign) BOOL highlightsSelectedTab; | 35 @property(nonatomic, assign) BOOL highlightsSelectedTab; |
| 36 @property(nonatomic, readonly, retain) UIView* view; | 36 @property(nonatomic, readonly, retain) UIView* view; |
| 37 // YES if the tab strip will display the mode toggle switch. May be set to the | |
| 38 // same value repeatedly with no layout penalty. | |
| 39 @property(nonatomic, assign) BOOL hasModeToggleSwitch; | |
| 40 | 37 |
| 41 // YES if the tab strip will display the tab switcher toggle switch. May be set | |
| 42 // to the same value repeatedly with no layout penalty. | |
| 43 @property(nonatomic, assign) BOOL hasTabSwitcherToggleSwitch; | |
| 44 | |
| 45 // May be nil if there is no mode toggle button. | |
| 46 @property(nonatomic, readonly, assign) UIButton* modeToggleButton; | |
| 47 // Used to check if the tabstrip is visible before starting an animation. | 38 // Used to check if the tabstrip is visible before starting an animation. |
| 48 @property(nonatomic, assign) id<FullScreenControllerDelegate> | 39 @property(nonatomic, assign) id<FullScreenControllerDelegate> |
| 49 fullscreenDelegate; | 40 fullscreenDelegate; |
| 50 | 41 |
| 51 // Designated initializer. | 42 // Designated initializer. |
| 52 - (instancetype)initWithTabModel:(TabModel*)tabModel | 43 - (instancetype)initWithTabModel:(TabModel*)tabModel |
| 53 style:(TabStrip::Style)style | 44 style:(TabStrip::Style)style |
| 54 NS_DESIGNATED_INITIALIZER; | 45 NS_DESIGNATED_INITIALIZER; |
| 55 | 46 |
| 56 - (instancetype)init NS_UNAVAILABLE; | 47 - (instancetype)init NS_UNAVAILABLE; |
| 57 | 48 |
| 58 // Called when a tab is tapped. |sender| should be a TabView. | 49 // Called when a tab is tapped. |sender| should be a TabView. |
| 59 - (IBAction)tabTapped:(id)sender; | 50 - (IBAction)tabTapped:(id)sender; |
| 60 | 51 |
| 61 // Records metrics for the given action. | 52 // Records metrics for the given action. |
| 62 - (IBAction)recordUserMetrics:(id)sender; | 53 - (IBAction)recordUserMetrics:(id)sender; |
| 63 | 54 |
| 64 @end | 55 @end |
| 65 | 56 |
| 66 #endif // IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_ | 57 #endif // IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_ |
| OLD | NEW |