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..f9618a74133111173fd4444e9d60a0066b7943a4 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: |
+ (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)numberOfOptions; |
+ |
+// The |index|th option string which is listed in the chooser. |
+- (NSString*)optionAtIndex:(NSInteger)index; |
+ |
+// 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_ |