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

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

Issue 2831293002: Change target+selector for block in InfoBarView (Closed)
Patch Set: Update 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.
jif 2017/04/21 11:12:48 Can you explain what NSUInteger is? For example:
gambard 2017/04/21 11:34:05 Done.
55 - (void)addLabel:(NSString*)label target:(id)target action:(SEL)action; 55 - (void)addLabel:(NSString*)label action:(void (^)(NSUInteger))action;
56 56
57 // Adds two buttons to the infobar. Button1 is the primary action of the infobar 57 // 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. 58 // and in Material Design mode is shown with bold colors to reflect this role.
59 - (void)addButton1:(NSString*)title1 59 - (void)addButton1:(NSString*)title1
60 tag1:(NSInteger)tag1 60 tag1:(NSInteger)tag1
61 button2:(NSString*)title2 61 button2:(NSString*)title2
62 tag2:(NSInteger)tag2 62 tag2:(NSInteger)tag2
63 target:(id)target 63 target:(id)target
64 action:(SEL)action; 64 action:(SEL)action;
65 65
66 // Adds a button to the infobar. 66 // Adds a button to the infobar.
67 - (void)addButton:(NSString*)title 67 - (void)addButton:(NSString*)title
68 tag:(NSInteger)tag 68 tag:(NSInteger)tag
69 target:(id)target 69 target:(id)target
70 action:(SEL)action; 70 action:(SEL)action;
71 71
72 // Adds to the infobar a switch and an adjacent label. 72 // Adds to the infobar a switch and an adjacent label.
73 - (void)addSwitchWithLabel:(NSString*)label 73 - (void)addSwitchWithLabel:(NSString*)label
74 isOn:(BOOL)isOn 74 isOn:(BOOL)isOn
75 tag:(NSInteger)tag 75 tag:(NSInteger)tag
76 target:(id)target 76 target:(id)target
77 action:(SEL)action; 77 action:(SEL)action;
78 78
79 @end 79 @end
80 80
81 #endif // IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_ 81 #endif // IOS_CHROME_BROWSER_UI_INFOBARS_INFOBAR_VIEW_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/translate/before_translate_infobar_controller.mm ('k') | ios/chrome/browser/ui/infobars/infobar_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698