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_TOOLBAR_NEW_TAB_BUTTON_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_TAB_BUTTON_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 // UIButton subclass used for the New Tab button in the phone switcher toolbar |
| 11 // and the tablet no-tabs toolbar. A NewTabButton has a custom background rect |
| 12 // and by default will call it's own (derived) -chromeExecuteCommand method |
| 13 // on |TouchUpInside|, and has a tag of |IDC_NEW_TAB|. Instances can add further |
| 14 // targets. |
| 15 @interface NewTabButton : UIButton |
| 16 // Whether the button opens incognito tabs or not; setting this property changes |
| 17 // the button's behavior, updating its tag to |
| 18 // IDS_IOS_TOOLS_MENU_NEW_INCOGNITO_TAB, and updates its appearance. |
| 19 @property(nonatomic, assign, getter=isIncognito) BOOL incognito; |
| 20 |
| 21 // If |animated|, animates the transition of the foreground image of the button. |
| 22 - (void)setIncognito:(BOOL)incognito animated:(BOOL)animated; |
| 23 |
| 24 @end |
| 25 |
| 26 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_NEW_TAB_BUTTON_H_ |
OLD | NEW |