OLD | NEW |
---|---|
(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_CHOOSER_CONTENT_VIEW_H_ | |
6 #define CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_H_ | |
7 | |
8 #import <Cocoa/Cocoa.h> | |
9 | |
10 #include "base/mac/scoped_nsobject.h" | |
11 | |
12 // A chooser content view class that user can select an option. | |
13 @interface ChooserContentView : NSView { | |
14 @private | |
15 base::scoped_nsobject<NSTextField> titleView_; | |
16 base::scoped_nsobject<NSScrollView> scrollView_; | |
17 base::scoped_nsobject<NSTableColumn> tableColumn_; | |
18 base::scoped_nsobject<NSTableView> tableView_; | |
19 base::scoped_nsobject<NSButton> connectButton_; | |
20 base::scoped_nsobject<NSButton> cancelButton_; | |
21 base::scoped_nsobject<NSBox> separator_; | |
22 base::scoped_nsobject<NSTextField> message_; | |
23 base::scoped_nsobject<NSButton> helpButton_; | |
24 } | |
25 | |
26 // Designated initializer. | |
27 - (id)initWithChooserTitle:(NSString*)chooserTitle; | |
Robert Sesek
2016/05/23 16:46:34
id -> instancetype
juncai
2016/05/23 17:48:01
Done.
| |
28 | |
29 // Creates the title for the chooser. | |
30 - (base::scoped_nsobject<NSTextField>)createChooserTitle:(NSString*)title; | |
31 | |
32 // Creates a button with |title|. | |
33 - (base::scoped_nsobject<NSButton>)createButtonWithTitle:(NSString*)title; | |
34 | |
35 // Creates the "Connect" button. | |
36 - (base::scoped_nsobject<NSButton>)createConnectButton; | |
37 | |
38 // Creates the "Cancel" button. | |
39 - (base::scoped_nsobject<NSButton>)createCancelButton; | |
40 | |
41 // Creates the separator. | |
42 - (base::scoped_nsobject<NSBox>)createSeparator; | |
43 | |
44 // Creates the message. | |
45 - (base::scoped_nsobject<NSTextField>)createMessage; | |
46 | |
47 // Creates the "Get help" button. | |
48 - (base::scoped_nsobject<NSButton>)createHelpButton; | |
49 | |
50 // Gets the table view for the chooser. | |
51 - (NSTableView*)getTableView; | |
Robert Sesek
2016/05/23 16:46:34
Mac getters do not have the word "get" in the name
juncai
2016/05/23 17:48:00
Done.
| |
52 | |
53 // Gets the "Connect" button. | |
54 - (NSButton*)getConnectButton; | |
55 | |
56 // Gets the "Cancel" button. | |
57 - (NSButton*)getCancelButton; | |
58 | |
59 // Gets the "Get help" button. | |
60 - (NSButton*)getHelpButton; | |
61 | |
62 @end | |
63 | |
64 #endif // CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_H_ | |
OLD | NEW |