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

Side by Side 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 address comments Created 4 years, 6 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 unified diff | Download patch
OLDNEW
(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 CHROME_BROWSER_UI_COCOA_EXTENSIONS_CHOOSER_DIALOG_COCOA_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_CHOOSER_DIALOG_COCOA_CONTROLLER_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/mac/scoped_nsobject.h"
11
12 @class ChooserContentView;
13 class ChooserController;
14 class ChooserDialogCocoa;
15
16 // Displays a chooser dialog, and notifies the ChooserController
17 // of the selected option.
18 @interface ChooserDialogCocoaController
19 : NSViewController<NSTableViewDataSource, NSTableViewDelegate> {
20 base::scoped_nsobject<ChooserContentView> chooserContentView_;
21 NSTableView* tableView_; // Weak.
22 NSButton* connectButton_; // Weak.
23 NSButton* cancelButton_; // Weak.
24 NSButton* helpButton_; // Weak.
25
26 ChooserDialogCocoa* chooserDialogCocoa_; // Weak.
27 ChooserController* chooserController_; // Weak.
28 }
29
30 // Designated initializer. |chooserDialogCocoa| and |chooserController|
31 // must both be non-nil.
32 - (instancetype)
33 initWithChooserDialogCocoa:(ChooserDialogCocoa*)chooserDialogCocoa
34 chooserController:(ChooserController*)chooserController;
35
36 // Update |tableView_| when chooser options were initialized.
37 - (void)onOptionsInitialized;
38
39 // Update |tableView_| when chooser option was added.
40 - (void)onOptionAdded:(NSInteger)index;
41
42 // Update |tableView_| when chooser option was removed.
43 - (void)onOptionRemoved:(NSInteger)index;
44
45 // Update |tableView_| when chooser options changed.
46 - (void)updateTableView;
47
48 // Called when the "Connect" button is pressed.
49 - (void)onConnect:(id)sender;
50
51 // Called when the "Cancel" button is pressed.
52 - (void)onCancel:(id)sender;
53
54 // Called when the "Get help" button is pressed.
55 - (void)onHelpPressed:(id)sender;
56
57 // Gets the |chooserContentView_|. For testing only.
58 - (ChooserContentView*)chooserContentView;
59
60 @end
61
62 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_CHOOSER_DIALOG_COCOA_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698