Chromium Code Reviews| Index: chrome/browser/ui/cocoa/chooser_content_view_cocoa.h |
| diff --git a/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h b/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h |
| index 02eb420faad86f9abd646240082513c28100682b..00ab4520fce28b0311fd0bf1e48b9c2ca7f14fe3 100644 |
| --- a/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h |
| +++ b/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h |
| @@ -7,8 +7,13 @@ |
| #import <Cocoa/Cocoa.h> |
| +#include <memory> |
| + |
| #include "base/mac/scoped_nsobject.h" |
| +class ChooserController; |
| +class TableViewController; |
| + |
| // A chooser content view class that user can select an option. |
| @interface ChooserContentViewCocoa : NSView { |
| @private |
| @@ -21,10 +26,14 @@ |
| base::scoped_nsobject<NSBox> separator_; |
| base::scoped_nsobject<NSTextField> message_; |
| base::scoped_nsobject<NSButton> helpButton_; |
| + std::unique_ptr<ChooserController> chooserController_; |
| + std::unique_ptr<TableViewController> tableViewController_; |
| } |
| // Designated initializer. |
| -- (instancetype)initWithChooserTitle:(NSString*)chooserTitle; |
| +- (instancetype)initWithChooserTitle:(NSString*)chooserTitle |
| + ChooserController: |
|
Robert Sesek
2016/06/22 21:46:30
nit: lowercase first c
juncai
2016/06/22 22:41:20
Done.
|
| + (std::unique_ptr<ChooserController>)chooserController; |
| // Creates the title for the chooser. |
| - (base::scoped_nsobject<NSTextField>)createChooserTitle:(NSString*)title; |
| @@ -59,6 +68,27 @@ |
| // Gets the "Get help" button. |
| - (NSButton*)helpButton; |
| +// The number of options in the |tableView_|. |
| +- (NSInteger)numOptions; |
|
Robert Sesek
2016/06/22 21:46:30
naming: numberOfOptions
juncai
2016/06/22 22:41:20
Done.
|
| + |
| +// The |index|th option string which is listed in the chooser. |
| +- (NSString*)getOption:(NSInteger)index; |
|
Robert Sesek
2016/06/22 21:46:29
naming: optionAtIndex:
juncai
2016/06/22 22:41:20
Done.
|
| + |
| +// Update |tableView_| when chooser options changed. |
| +- (void)updateTableView; |
| + |
| +// Called when the "Connect" button is pressed. |
| +- (void)accept; |
| + |
| +// Called when the "Cancel" button is pressed. |
| +- (void)cancel; |
| + |
| +// Called when the chooser is closed. |
| +- (void)close; |
| + |
| +// Called when the "Get help" button is pressed. |
| +- (void)onHelpPressed:(id)sender; |
| + |
| @end |
| #endif // CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_ |