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

Unified Diff: chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h

Issue 2005443002: Implement bluetooth chooser for Chrome Apps on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_chooser_bubble_ui_cocoa
Patch Set: rebase and display app name on the chooser title Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h
diff --git a/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h b/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4ab054d187abf7f455491e8128358fc89ce8b90
--- /dev/null
+++ b/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.h
@@ -0,0 +1,58 @@
+// 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 CHROME_BROWSER_UI_COCOA_EXTENSIONS_CHOOSER_DIALOG_COCOA_CONTROLLER_H_
+#define CHROME_BROWSER_UI_COCOA_EXTENSIONS_CHOOSER_DIALOG_COCOA_CONTROLLER_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/mac/scoped_nsobject.h"
+
+@class ChooserContentView;
+class ChooserController;
+class ChooserDialogCocoa;
+
+// Displays a chooser dialog, and notifies the ChooserController
+// of the selected option.
+@interface ChooserDialogCocoaController
+ : NSViewController<NSTableViewDataSource, NSTableViewDelegate> {
+ base::scoped_nsobject<ChooserContentView> chooserContentView_;
+ NSTableView* tableView_; // Weak.
+ NSButton* connectButton_; // Weak.
+ NSButton* cancelButton_; // Weak.
+ NSButton* helpButton_; // Weak.
+
+ ChooserDialogCocoa* chooserDialogCocoa_; // Weak.
+ ChooserController* chooserController_; // Weak.
+}
+
+// Designated initializer. || and || must both be non-nil.
+- (instancetype)
+initWithChooserDialogCocoa:(ChooserDialogCocoa*)chooserDialogCocoa
Robert Sesek 2016/05/23 20:13:53 nit: break after the : instead
juncai 2016/05/27 21:30:37 Done.
+ initWithChooserController:(ChooserController*)chooserController;
Robert Sesek 2016/05/23 20:13:53 nit: indent 4
juncai 2016/05/27 21:30:37 Done.
+
+// Update |tableView_| when chooser options were initialized.
+- (void)onOptionsInitialized;
+
+// Update |tableView_| when chooser option was added.
+- (void)onOptionAdded:(NSInteger)index;
+
+// Update |tableView_| when chooser option was removed.
+- (void)onOptionRemoved:(NSInteger)index;
+
+// Update |tableView_| when chooser options changed.
+- (void)updateTableView;
+
+// Called when the "Connect" button is pressed.
+- (void)onConnect:(id)sender;
+
+// Called when the "Cancel" button is pressed.
+- (void)onCancel:(id)sender;
+
+// Called when the "Get help" button is pressed.
+- (void)onHelpPressed:(id)sender;
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_CHOOSER_DIALOG_COCOA_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698