Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_CONTROLLER_H_ | |
| 6 #define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_CONTROLLER_H_ | |
| 7 | |
| 8 #import <UIKit/UIKit.h> | |
| 9 | |
| 10 @class InfoBarPickerController; | |
| 11 | |
| 12 // Delegate protocol for InfoBarPickerController. | |
| 13 @protocol InfoBarPickerControllerDelegate<NSObject> | |
| 14 // Returns text for |row| in the picker. | |
| 15 - (NSString*)infoBarPickerController:(InfoBarPickerController*)controller | |
| 16 textForRow:(NSInteger)row; | |
| 17 // Returns the number of rows in the picker. | |
| 18 - (NSInteger)infoBarPickerControllerNumberOfRows: | |
| 19 (InfoBarPickerController*)controller; | |
| 20 // Returns the index of the row to be initially selected in the picker. | |
| 21 - (NSInteger)infoBarPickerControllerInitialRow: | |
| 22 (InfoBarPickerController*)controller; | |
| 23 @optional | |
| 24 // If implemented, returns the index of the row to be disabled in the picker. | |
| 25 - (NSInteger)infoBarPickerControllerDisabledRow: | |
| 26 (InfoBarPickerController*)controller; | |
| 27 @end | |
| 28 | |
| 29 // View controller for displaying a UIPickerView topped by a UINavigationBar | |
| 30 // displaying "Done" on the right and "Cancel" on the left. | |
| 31 @interface InfoBarPickerController : UIViewController | |
|
marq (ping after 24h)
2016/06/30 16:10:11
Please name view controller subclasses "<something
Jackie Quinn
2016/06/30 18:00:39
Done.
| |
| 32 // The picker view displayed by the InfoBarPickerController. | |
| 33 @property(nonatomic, retain) UIPickerView* pickerView; | |
| 34 @property(nonatomic, weak) id<InfoBarPickerControllerDelegate> delegate; | |
| 35 // Sets target and action for the "Done" button. | |
| 36 - (void)setDoneTarget:(id)target action:(SEL)action; | |
| 37 // Sets target and action for the "Cancel" button. | |
| 38 - (void)setCancelTarget:(id)target action:(SEL)action; | |
| 39 @end | |
| 40 | |
| 41 @interface InfoBarPickerController () | |
| 42 // The displayed UINavigationBar. Exposed for testing. | |
| 43 @property(nonatomic, retain) UINavigationBar* navigationBar; | |
| 44 @end | |
| 45 | |
| 46 #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_CONTROLLER_H_ | |
| OLD | NEW |