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_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TABS_TAB_VIEW_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #include "base/mac/scoped_nsobject.h" |
| 11 #import "ios/chrome/browser/tabs/tab.h" |
| 12 |
| 13 @class GTMFadeTruncatingLabel; |
| 14 |
| 15 // View class that draws a Chrome-style tab. |
| 16 @interface TabView : UIControl |
| 17 |
| 18 @property(nonatomic, readonly, retain) UIButton* closeButton; |
| 19 @property(nonatomic, readonly, retain) GTMFadeTruncatingLabel* titleLabel; |
| 20 @property(nonatomic, retain) UIImage* favicon; |
| 21 @property(nonatomic, assign, getter=isCollapsed) BOOL collapsed; |
| 22 @property(nonatomic, retain) UIImage* background; |
| 23 @property(nonatomic, assign) BOOL incognitoStyle; |
| 24 |
| 25 // Designated initializer. Creates a TabView with frame equal to CGRectZero. |
| 26 // If |emptyView| is YES, it creates a TabView without buttons or spinner. |
| 27 // |selected|, the selected state of the tab, is provided to ensure the |
| 28 // background is drawn correctly the first time, rather than requiring that |
| 29 // -setSelected be called in order for it to be drawn correctly. |
| 30 - (id)initWithEmptyView:(BOOL)emptyView selected:(BOOL)selected; |
| 31 |
| 32 // Sets the title. |
| 33 - (void)setTitle:(NSString*)title; |
| 34 // Starts the progress spinner animation. |
| 35 - (void)startProgressSpinner; |
| 36 // Stops the progress spinner animation. |
| 37 - (void)stopProgressSpinner; |
| 38 |
| 39 @end |
| 40 |
| 41 #endif // IOS_CHROME_BROWSER_UI_TABS_TAB_VIEW_H_ |
OLD | NEW |