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

Side by Side Diff: chrome/browser/ui/cocoa/chooser_content_view_cocoa.h

Issue 2169513004: Add spinner, status text and Re-scan button to Bluetooth chooser on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modified spinner size and align rescan text with buttons Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/mac/scoped_nsobject.h" 12 #include "base/mac/scoped_nsobject.h"
13 13
14 class ChooserController; 14 class ChooserController;
15 class TableViewController; 15 @class SpinnerView;
16 class ChooserContentViewController;
16 17
17 // A chooser content view class that user can select an option. 18 // A chooser content view class that user can select an option.
18 @interface ChooserContentViewCocoa : NSView { 19 @interface ChooserContentViewCocoa : NSView {
19 @private 20 @private
20 base::scoped_nsobject<NSTextField> titleView_; 21 base::scoped_nsobject<NSTextField> titleView_;
21 base::scoped_nsobject<NSScrollView> scrollView_; 22 base::scoped_nsobject<NSScrollView> scrollView_;
22 base::scoped_nsobject<NSTableColumn> tableColumn_; 23 base::scoped_nsobject<NSTableColumn> tableColumn_;
23 base::scoped_nsobject<NSTableView> tableView_; 24 base::scoped_nsobject<NSTableView> tableView_;
25 base::scoped_nsobject<SpinnerView> spinner_;
26 base::scoped_nsobject<NSTextField> status_;
27 base::scoped_nsobject<NSButton> rescanButton_;
24 base::scoped_nsobject<NSButton> connectButton_; 28 base::scoped_nsobject<NSButton> connectButton_;
25 base::scoped_nsobject<NSButton> cancelButton_; 29 base::scoped_nsobject<NSButton> cancelButton_;
26 base::scoped_nsobject<NSBox> separator_; 30 base::scoped_nsobject<NSBox> separator_;
27 base::scoped_nsobject<NSTextField> message_; 31 base::scoped_nsobject<NSTextField> message_;
28 base::scoped_nsobject<NSButton> helpButton_; 32 base::scoped_nsobject<NSButton> helpButton_;
29 std::unique_ptr<ChooserController> chooserController_; 33 std::unique_ptr<ChooserController> chooserController_;
30 std::unique_ptr<TableViewController> tableViewController_; 34 std::unique_ptr<ChooserContentViewController> chooserContentViewController_;
31 } 35 }
32 36
33 // Designated initializer. 37 // Designated initializer.
34 - (instancetype)initWithChooserTitle:(NSString*)chooserTitle 38 - (instancetype)initWithChooserTitle:(NSString*)chooserTitle
35 chooserController: 39 chooserController:
36 (std::unique_ptr<ChooserController>)chooserController; 40 (std::unique_ptr<ChooserController>)chooserController;
37 41
38 // Creates the title for the chooser. 42 // Creates the title for the chooser.
39 - (base::scoped_nsobject<NSTextField>)createChooserTitle:(NSString*)title; 43 - (base::scoped_nsobject<NSTextField>)createChooserTitle:(NSString*)title;
40 44
41 // Creates a button with |title|. 45 // Creates a button with |title|.
42 - (base::scoped_nsobject<NSButton>)createButtonWithTitle:(NSString*)title; 46 - (base::scoped_nsobject<NSButton>)createButtonWithTitle:(NSString*)title;
43 47
44 // Creates the "Connect" button. 48 // Creates the "Connect" button.
45 - (base::scoped_nsobject<NSButton>)createConnectButton; 49 - (base::scoped_nsobject<NSButton>)createConnectButton;
46 50
47 // Creates the "Cancel" button. 51 // Creates the "Cancel" button.
48 - (base::scoped_nsobject<NSButton>)createCancelButton; 52 - (base::scoped_nsobject<NSButton>)createCancelButton;
49 53
50 // Creates the separator. 54 // Creates the separator.
51 - (base::scoped_nsobject<NSBox>)createSeparator; 55 - (base::scoped_nsobject<NSBox>)createSeparator;
52 56
53 // Creates the message. 57 // Creates a text field with |text|.
54 - (base::scoped_nsobject<NSTextField>)createMessage; 58 - (base::scoped_nsobject<NSTextField>)createTextField:(NSString*)text;
55 59
56 // Creates the "Get help" button. 60 // Creates a hyperlink button with |text|.
57 - (base::scoped_nsobject<NSButton>)createHelpButton; 61 - (base::scoped_nsobject<NSButton>)createHyperlinkButtonWithText:
62 (NSString*)text;
58 63
59 // Gets the table view for the chooser. 64 // Gets the table view for the chooser.
60 - (NSTableView*)tableView; 65 - (NSTableView*)tableView;
61 66
62 // Gets the "Connect" button. 67 // Gets the "Connect" button.
63 - (NSButton*)connectButton; 68 - (NSButton*)connectButton;
64 69
65 // Gets the "Cancel" button. 70 // Gets the "Cancel" button.
66 - (NSButton*)cancelButton; 71 - (NSButton*)cancelButton;
67 72
(...skipping 11 matching lines...) Expand all
79 84
80 // Called when the "Connect" button is pressed. 85 // Called when the "Connect" button is pressed.
81 - (void)accept; 86 - (void)accept;
82 87
83 // Called when the "Cancel" button is pressed. 88 // Called when the "Cancel" button is pressed.
84 - (void)cancel; 89 - (void)cancel;
85 90
86 // Called when the chooser is closed. 91 // Called when the chooser is closed.
87 - (void)close; 92 - (void)close;
88 93
94 // Called when "Re-scan" button is pressed.
95 - (void)onRescan:(id)sender;
96
89 // Called when the "Get help" button is pressed. 97 // Called when the "Get help" button is pressed.
90 - (void)onHelpPressed:(id)sender; 98 - (void)onHelpPressed:(id)sender;
91 99
92 @end 100 @end
93 101
94 #endif // CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_ 102 #endif // CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698