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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/tabs/tab_strip_controller.h
diff --git a/ios/chrome/browser/ui/tabs/tab_strip_controller.h b/ios/chrome/browser/ui/tabs/tab_strip_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..e1d740bd07502999f82dc016e0892d38791f980d
--- /dev/null
+++ b/ios/chrome/browser/ui/tabs/tab_strip_controller.h
@@ -0,0 +1,66 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+@class TabModel;
+@class TabView;
+@protocol FullScreenControllerDelegate;
+
+namespace TabStrip {
+enum Style { kStyleDark, kStyleIncognito };
+
+// Returns the background color of the tabstrip view.
+UIColor* BackgroundColor();
+
+} // namespace TabStrip
+
+// Notification when the tab strip will start an animation.
+extern NSString* const kWillStartTabStripTabAnimation;
+
+// Notifications when the user starts and ends a drag operation.
+extern NSString* const kTabStripDragStarted;
+extern NSString* const kTabStripDragEnded;
+
+// Controller class for the tabstrip. Manages displaying tabs and keeping the
+// display in sync with the TabModel. This controller is only instantiated on
+// tablet. The tab strip view itself is a subclass of UIScrollView, which
+// manages scroll offsets and scroll animations.
+@interface TabStripController : NSObject
+
+@property(nonatomic, assign) BOOL highlightsSelectedTab;
+@property(nonatomic, readonly, retain) UIView* view;
+// YES if the tab strip will display the mode toggle switch. May be set to the
+// same value repeatedly with no layout penalty.
+@property(nonatomic, assign) BOOL hasModeToggleSwitch;
+
+// YES if the tab strip will display the tab switcher toggle switch. May be set
+// to the same value repeatedly with no layout penalty.
+@property(nonatomic, assign) BOOL hasTabSwitcherToggleSwitch;
+
+// May be nil if there is no mode toggle button.
+@property(nonatomic, readonly, assign) UIButton* modeToggleButton;
+// Used to check if the tabstrip is visible before starting an animation.
+@property(nonatomic, assign) id<FullScreenControllerDelegate>
+ fullscreenDelegate;
+
+// Designated initializer.
+- (instancetype)initWithTabModel:(TabModel*)tabModel
+ style:(TabStrip::Style)style
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Called when a tab is tapped. |sender| should be a TabView.
+- (IBAction)tabTapped:(id)sender;
+
+// Records metrics for the given action.
+- (IBAction)recordUserMetrics:(id)sender;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_CONTROLLER_H_
« 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