OLD | NEW |
(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_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_VIEW_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 // Notification sent by the tab strip when its frame changes. |
| 11 extern NSString* const kTabStripViewFrameDidChangeNotification; |
| 12 |
| 13 // TabStripView does not lay out its own subviews, instead handing that off to a |
| 14 // delegate. This protocol is implemented by TabStripView delegates that are |
| 15 // capable of handling layout. |
| 16 // The TabStripViewLayoutDelegate also forward notification of change of trait |
| 17 // collection that impact layout. |
| 18 @protocol TabStripViewLayoutDelegate |
| 19 // Called from |-layoutSubviews|. Delegates should implement this method to |
| 20 // layout subviews based on the current contentOffset of the tab strip. |
| 21 // TabStripView does not perform any other subview layout. |
| 22 - (void)layoutTabStripSubviews; |
| 23 // Called from UIView |-traitCollectionDidChange:|. |
| 24 - (void)traitCollectionDidChange:(UITraitCollection*)previousTraitCollection; |
| 25 @end |
| 26 |
| 27 // View class for the tabstrip. Contains one TabView per open tab and manages |
| 28 // tab overflow behavior. |
| 29 @interface TabStripView : UIScrollView { |
| 30 @private |
| 31 id<TabStripViewLayoutDelegate> layoutDelegate_; |
| 32 } |
| 33 |
| 34 @property(nonatomic, readwrite, assign) id<TabStripViewLayoutDelegate> |
| 35 layoutDelegate; |
| 36 |
| 37 @end |
| 38 |
| 39 #endif // IOS_CHROME_BROWSER_UI_TABS_TAB_STRIP_VIEW_H_ |
OLD | NEW |