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

Side by Side Diff: ios/chrome/browser/infobars/infobar_picker_view_controller.h

Issue 2107743002: Add InfoBarPickerController for displaying a picker view from an infobar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_passwords_strings
Patch Set: Rename InfoBarPickerController to InfoBarPickerViewController Created 4 years, 5 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_VIEW_CONTROLLER_H_
7
8 #import <UIKit/UIKit.h>
9
10 @class InfoBarPickerViewController;
11
12 // Delegate protocol for InfoBarPickerViewController.
13 @protocol InfoBarPickerViewControllerDelegate<NSObject>
14 // Returns text for |row| in the picker.
15 - (NSString*)infoBarPickerViewController:
16 (InfoBarPickerViewController*)controller
17 textForRow:(NSInteger)row;
18 // Returns the number of rows in the picker.
19 - (NSInteger)infoBarPickerViewControllerNumberOfRows:
20 (InfoBarPickerViewController*)controller;
21 // Returns the index of the row to be initially selected in the picker.
22 - (NSInteger)infoBarPickerViewControllerInitialRow:
23 (InfoBarPickerViewController*)controller;
24 @optional
25 // If implemented, returns the index of the row to be disabled in the picker.
26 - (NSInteger)infoBarPickerViewControllerDisabledRow:
27 (InfoBarPickerViewController*)controller;
28 @end
29
30 // View controller for displaying a UIPickerView topped by a UINavigationBar
31 // displaying "Done" on the right and "Cancel" on the left.
32 @interface InfoBarPickerViewController : UIViewController
33 // The picker view displayed by the InfoBarPickerViewController.
34 @property(nonatomic, retain) UIPickerView* pickerView;
35 @property(nonatomic, weak) id<InfoBarPickerViewControllerDelegate> delegate;
36 // Sets target and action for the "Done" button.
37 - (void)setDoneTarget:(id)target action:(SEL)action;
38 // Sets target and action for the "Cancel" button.
39 - (void)setCancelTarget:(id)target action:(SEL)action;
40 @end
41
42 @interface InfoBarPickerViewController ()
43 // The displayed UINavigationBar. Exposed for testing.
44 @property(nonatomic, retain) UINavigationBar* navigationBar;
45 @end
46
47 #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_VIEW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/BUILD.gn ('k') | ios/chrome/browser/infobars/infobar_picker_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698