Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: ios/chrome/browser/ui/infobars/infobar_view.h

Issue 2592113002: Remove legacy InfoBarViewProtocol. (Closed)
Patch Set: Rebase. Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/infobars/BUILD.gn ('k') | ios/chrome/browser/ui/infobars/infobar_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/infobars/infobar_view.h
diff --git a/ios/chrome/browser/ui/infobars/infobar_view.h b/ios/chrome/browser/ui/infobars/infobar_view.h
index bdd312abcf0cba95d1a7647033119c0c29dc79f0..1dca2431e89ad9d5a0b8bfff37e1ab296dbad427 100644
--- a/ios/chrome/browser/ui/infobars/infobar_view.h
+++ b/ios/chrome/browser/ui/infobars/infobar_view.h
@@ -7,15 +7,75 @@
#import <UIKit/UIKit.h>
#import "ios/chrome/browser/ui/fancy_ui/bidi_container_view.h"
-#import "ios/chrome/browser/ui/infobars/infobar_view_protocol.h"
class InfoBarViewDelegate;
-@protocol InfoBarViewProtocol;
// UIView representing a single infobar.
-@interface InfoBarView : BidiContainerView<InfoBarViewProtocol>
+@interface InfoBarView : BidiContainerView
+
- (instancetype)initWithFrame:(CGRect)frame
delegate:(InfoBarViewDelegate*)delegate;
+
+// How much of infobar is visible. The infobar is only partly visible during
+// showing/hiding animation.
+@property(nonatomic, assign) CGFloat visibleHeight;
+
+// Label text with links initialized with |stringAsLink:|.
+@property(nonatomic, readonly) NSString* markedLabel;
+
+// Stops propagating events to delegate.
+- (void)resetDelegate;
+
+// TODO(crbug.com/302582): rename methods from add* to set*.
+// Adds a dismiss button subview.
+- (void)addCloseButtonWithTag:(NSInteger)tag
+ target:(id)target
+ action:(SEL)action;
+
+// Adds icon subview.
+- (void)addLeftIcon:(UIImage*)image;
+
+// Adds transparent icon of size |imageSize| as placeholder during the time when
+// the icon is being downloaded.
+- (void)addPlaceholderTransparentIcon:(CGSize const&)imageSize;
+
+// Adds an icon subview with rounded corners and a shadow.
+- (void)addLeftIconWithRoundedCornersAndShadow:(UIImage*)image;
+
+// Creates a new string from |string| that is interpreted as a link by
+// |addLabel:|. |tag| must not be 0.
++ (NSString*)stringAsLink:(NSString*)string tag:(NSUInteger)tag;
+
+// Adds a message to the infobar that optionaly contains links initialized with
+// |stringAsLink:|.
+- (void)addLabel:(NSString*)label;
+
+// Adds a message to the infobar that optionaly contains links initialized with
+// |stringAsLink:|. |action| is called on |target| when a link is clicked.
+- (void)addLabel:(NSString*)label target:(id)target action:(SEL)action;
+
+// Adds two buttons to the infobar. Button1 is the primary action of the infobar
+// and in Material Design mode is shown with bold colors to reflect this role.
+- (void)addButton1:(NSString*)title1
+ tag1:(NSInteger)tag1
+ button2:(NSString*)title2
+ tag2:(NSInteger)tag2
+ target:(id)target
+ action:(SEL)action;
+
+// Adds a button to the infobar.
+- (void)addButton:(NSString*)title
+ tag:(NSInteger)tag
+ target:(id)target
+ action:(SEL)action;
+
+// Adds to the infobar a switch and an adjacent label.
+- (void)addSwitchWithLabel:(NSString*)label
+ isOn:(BOOL)isOn
+ tag:(NSInteger)tag
+ target:(id)target
+ action:(SEL)action;
+
@end
#endif // IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_
« no previous file with comments | « ios/chrome/browser/ui/infobars/BUILD.gn ('k') | ios/chrome/browser/ui/infobars/infobar_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698