| Index: ios/chrome/browser/infobars/infobar_picker_view_controller.h
|
| diff --git a/ios/chrome/browser/infobars/infobar_picker_view_controller.h b/ios/chrome/browser/infobars/infobar_picker_view_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0bfd245bcbe1da1deec2a12c0b8d7d6a8dc8550e
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/infobars/infobar_picker_view_controller.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_VIEW_CONTROLLER_H_
|
| +#define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_VIEW_CONTROLLER_H_
|
| +
|
| +#import <UIKit/UIKit.h>
|
| +
|
| +@class InfoBarPickerViewController;
|
| +
|
| +// Delegate protocol for InfoBarPickerViewController.
|
| +@protocol InfoBarPickerViewControllerDelegate<NSObject>
|
| +// Returns text for |row| in the picker.
|
| +- (NSString*)infoBarPickerViewController:
|
| + (InfoBarPickerViewController*)controller
|
| + textForRow:(NSInteger)row;
|
| +// Returns the number of rows in the picker.
|
| +- (NSInteger)infoBarPickerViewControllerNumberOfRows:
|
| + (InfoBarPickerViewController*)controller;
|
| +// Returns the index of the row to be initially selected in the picker.
|
| +- (NSInteger)infoBarPickerViewControllerInitialRow:
|
| + (InfoBarPickerViewController*)controller;
|
| +@optional
|
| +// If implemented, returns the index of the row to be disabled in the picker.
|
| +- (NSInteger)infoBarPickerViewControllerDisabledRow:
|
| + (InfoBarPickerViewController*)controller;
|
| +@end
|
| +
|
| +// View controller for displaying a UIPickerView topped by a UINavigationBar
|
| +// displaying "Done" on the right and "Cancel" on the left.
|
| +@interface InfoBarPickerViewController : UIViewController
|
| +// The picker view displayed by the InfoBarPickerViewController.
|
| +@property(nonatomic, retain) UIPickerView* pickerView;
|
| +@property(nonatomic, weak) id<InfoBarPickerViewControllerDelegate> delegate;
|
| +// Sets target and action for the "Done" button.
|
| +- (void)setDoneTarget:(id)target action:(SEL)action;
|
| +// Sets target and action for the "Cancel" button.
|
| +- (void)setCancelTarget:(id)target action:(SEL)action;
|
| +@end
|
| +
|
| +@interface InfoBarPickerViewController ()
|
| +// The displayed UINavigationBar. Exposed for testing.
|
| +@property(nonatomic, retain) UINavigationBar* navigationBar;
|
| +@end
|
| +
|
| +#endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_PICKER_VIEW_CONTROLLER_H_
|
|
|