| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 | 4 |
| 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_UI_INFOBAR_VIEW_PROTOCOL_H_ | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_UI_INFOBAR_VIEW_PROTOCOL_H_ |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_UI_INFOBAR_VIEW_PROTOCOL_H_ | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_UI_INFOBAR_VIEW_PROTOCOL_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 struct CGSize; | 10 struct CGSize; |
| 11 class InfoBarViewDelegate; | 11 class InfoBarViewDelegate; |
| 12 @class UIImage; | 12 @class UIImage; |
| 13 | 13 |
| 14 // Interface for setting up the infobar's widgets. | 14 // Interface for setting up the infobar's widgets. |
| 15 @protocol InfoBarViewProtocol | 15 @protocol InfoBarViewProtocol |
| 16 // How much of infobar is visible. The infobar is only partly visible during | 16 // How much of infobar is visible. The infobar is only partly visible during |
| 17 // showing/hiding animation. | 17 // showing/hiding animation. |
| 18 @property(nonatomic, assign) CGFloat visibleHeight; | 18 @property(nonatomic, assign) CGFloat visibleHeight; |
| 19 | 19 |
| 20 // The designated initializer. | |
| 21 - (instancetype)initWithFrame:(CGRect)frame | |
| 22 delegate:(InfoBarViewDelegate*)delegate; | |
| 23 | |
| 24 // Stops propagating events to delegate. | 20 // Stops propagating events to delegate. |
| 25 - (void)resetDelegate; | 21 - (void)resetDelegate; |
| 26 | 22 |
| 27 // TODO(jif): rename methods from add* to set*. crbug.com/302582 | 23 // TODO(jif): rename methods from add* to set*. crbug.com/302582 |
| 28 // Adds a dismiss button subview. | 24 // Adds a dismiss button subview. |
| 29 - (void)addCloseButtonWithTag:(NSInteger)tag | 25 - (void)addCloseButtonWithTag:(NSInteger)tag |
| 30 target:(id)target | 26 target:(id)target |
| 31 action:(SEL)action; | 27 action:(SEL)action; |
| 32 | 28 |
| 33 // Adds icon subview. | 29 // Adds icon subview. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Adds to the infobar a switch and an adjacent label. | 66 // Adds to the infobar a switch and an adjacent label. |
| 71 - (void)addSwitchWithLabel:(NSString*)label | 67 - (void)addSwitchWithLabel:(NSString*)label |
| 72 isOn:(BOOL)isOn | 68 isOn:(BOOL)isOn |
| 73 tag:(NSInteger)tag | 69 tag:(NSInteger)tag |
| 74 target:(id)target | 70 target:(id)target |
| 75 action:(SEL)action; | 71 action:(SEL)action; |
| 76 | 72 |
| 77 @end | 73 @end |
| 78 | 74 |
| 79 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_UI_INFOBAR_VIEW_PROTOCOL_H_ | 75 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_UI_INFOBAR_VIEW_PROTOCOL_H_ |
| OLD | NEW |