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

Side by Side Diff: ios/chrome/browser/ui/infobars/infobar_view.h

Issue 2831293002: Change target+selector for block in InfoBarView (Closed)
Patch Set: Address comment Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Creates a new string from |string| that is interpreted as a link by 45 // Creates a new string from |string| that is interpreted as a link by
46 // |addLabel:|. |tag| must not be 0. 46 // |addLabel:|. |tag| must not be 0.
47 + (NSString*)stringAsLink:(NSString*)string tag:(NSUInteger)tag; 47 + (NSString*)stringAsLink:(NSString*)string tag:(NSUInteger)tag;
48 48
49 // Adds a message to the infobar that optionaly contains links initialized with 49 // Adds a message to the infobar that optionaly contains links initialized with
50 // |stringAsLink:|. 50 // |stringAsLink:|.
51 - (void)addLabel:(NSString*)label; 51 - (void)addLabel:(NSString*)label;
52 52
53 // Adds a message to the infobar that optionaly contains links initialized with 53 // Adds a message to the infobar that optionaly contains links initialized with
54 // |stringAsLink:|. |action| is called on |target| when a link is clicked. 54 // |stringAsLink:|. |action| is called when a link is clicked, with the tag
55 - (void)addLabel:(NSString*)label target:(id)target action:(SEL)action; 55 // associated with the link passed as a parameter..
56 - (void)addLabel:(NSString*)label action:(void (^)(NSUInteger))action;
56 57
57 // Adds two buttons to the infobar. Button1 is the primary action of the infobar 58 // Adds two buttons to the infobar. Button1 is the primary action of the infobar
58 // and in Material Design mode is shown with bold colors to reflect this role. 59 // and in Material Design mode is shown with bold colors to reflect this role.
59 - (void)addButton1:(NSString*)title1 60 - (void)addButton1:(NSString*)title1
60 tag1:(NSInteger)tag1 61 tag1:(NSInteger)tag1
61 button2:(NSString*)title2 62 button2:(NSString*)title2
62 tag2:(NSInteger)tag2 63 tag2:(NSInteger)tag2
63 target:(id)target 64 target:(id)target
64 action:(SEL)action; 65 action:(SEL)action;
65 66
66 // Adds a button to the infobar. 67 // Adds a button to the infobar.
67 - (void)addButton:(NSString*)title 68 - (void)addButton:(NSString*)title
68 tag:(NSInteger)tag 69 tag:(NSInteger)tag
69 target:(id)target 70 target:(id)target
70 action:(SEL)action; 71 action:(SEL)action;
71 72
72 // Adds to the infobar a switch and an adjacent label. 73 // Adds to the infobar a switch and an adjacent label.
73 - (void)addSwitchWithLabel:(NSString*)label 74 - (void)addSwitchWithLabel:(NSString*)label
74 isOn:(BOOL)isOn 75 isOn:(BOOL)isOn
75 tag:(NSInteger)tag 76 tag:(NSInteger)tag
76 target:(id)target 77 target:(id)target
77 action:(SEL)action; 78 action:(SEL)action;
78 79
79 @end 80 @end
80 81
81 #endif // IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ 82 #endif // IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698