OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 #ifndef IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ | 4 #ifndef IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ |
5 #define IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ | 5 #define IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #import "ios/chrome/browser/ui/fancy_ui/bidi_container_view.h" | 9 #import "ios/chrome/browser/ui/fancy_ui/bidi_container_view.h" |
10 | 10 |
11 class InfoBarViewDelegate; | 11 class InfoBarViewDelegate; |
12 | 12 |
13 // UIView representing a single infobar. | 13 // UIView representing a single infobar. |
14 @interface InfoBarView : BidiContainerView | 14 @interface InfoBarView : BidiContainerView |
15 | 15 |
16 - (instancetype)initWithFrame:(CGRect)frame | 16 - (instancetype)initWithFrame:(CGRect)frame |
17 delegate:(InfoBarViewDelegate*)delegate; | 17 delegate:(InfoBarViewDelegate*)delegate; |
18 | 18 |
19 // How much of infobar is visible. The infobar is only partly visible during | 19 // How much of infobar is visible. The infobar is only partly visible during |
20 // showing/hiding animation. | 20 // showing/hiding animation. |
21 @property(nonatomic, assign) CGFloat visibleHeight; | 21 @property(nonatomic, assign) CGFloat visibleHeight; |
22 | 22 |
23 // Label text with links initialized with |stringAsLink:|. | 23 // Label text with links initialized with |stringAsLink:|. |
24 @property(nonatomic, readonly) NSString* markedLabel; | 24 @property(nonatomic, strong, readonly) NSString* markedLabel; |
25 | 25 |
26 // Stops propagating events to delegate. | 26 // Stops propagating events to delegate. |
27 - (void)resetDelegate; | 27 - (void)resetDelegate; |
28 | 28 |
29 // TODO(crbug.com/302582): rename methods from add* to set*. | 29 // TODO(crbug.com/302582): rename methods from add* to set*. |
30 // Adds a dismiss button subview. | 30 // Adds a dismiss button subview. |
31 - (void)addCloseButtonWithTag:(NSInteger)tag | 31 - (void)addCloseButtonWithTag:(NSInteger)tag |
32 target:(id)target | 32 target:(id)target |
33 action:(SEL)action; | 33 action:(SEL)action; |
34 | 34 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Adds to the infobar a switch and an adjacent label. | 73 // Adds to the infobar a switch and an adjacent label. |
74 - (void)addSwitchWithLabel:(NSString*)label | 74 - (void)addSwitchWithLabel:(NSString*)label |
75 isOn:(BOOL)isOn | 75 isOn:(BOOL)isOn |
76 tag:(NSInteger)tag | 76 tag:(NSInteger)tag |
77 target:(id)target | 77 target:(id)target |
78 action:(SEL)action; | 78 action:(SEL)action; |
79 | 79 |
80 @end | 80 @end |
81 | 81 |
82 #endif // IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ | 82 #endif // IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ |
OLD | NEW |