Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: ios/chrome/browser/ui/tabs/tab_strip_controller.h

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_
7
8 #import <UIKit/UIKit.h>
9
10 @class TabModel;
11 @class TabView;
12 @protocol FullScreenControllerDelegate;
13
14 namespace TabStrip {
15 enum Style { kStyleDark, kStyleIncognito };
16
17 // Returns the background color of the tabstrip view.
18 UIColor* BackgroundColor();
19
20 } // namespace TabStrip
21
22 // Notification when the tab strip will start an animation.
23 extern NSString* const kWillStartTabStripTabAnimation;
24
25 // Notifications when the user starts and ends a drag operation.
26 extern NSString* const kTabStripDragStarted;
27 extern NSString* const kTabStripDragEnded;
28
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
31 // tablet. The tab strip view itself is a subclass of UIScrollView, which
32 // manages scroll offsets and scroll animations.
33 @interface TabStripController : NSObject
34
35 @property(nonatomic, assign) BOOL highlightsSelectedTab;
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
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.
48 @property(nonatomic, assign) id<FullScreenControllerDelegate>
49 fullscreenDelegate;
50
51 // Designated initializer.
52 - (instancetype)initWithTabModel:(TabModel*)tabModel
53 style:(TabStrip::Style)style
54 NS_DESIGNATED_INITIALIZER;
55
56 - (instancetype)init NS_UNAVAILABLE;
57
58 // Called when a tab is tapped. |sender| should be a TabView.
59 - (IBAction)tabTapped:(id)sender;
60
61 // Records metrics for the given action.
62 - (IBAction)recordUserMetrics:(id)sender;
63
64 @end
65
66 #endif // IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/tab_switcher/tab_switcher_view.mm ('k') | ios/chrome/browser/ui/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698