OLD | NEW |
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> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 63 } |
64 | 64 |
65 // Designated initializer. | 65 // Designated initializer. |
66 - (instancetype)initWithChooserTitle:(NSString*)chooserTitle | 66 - (instancetype)initWithChooserTitle:(NSString*)chooserTitle |
67 chooserController: | 67 chooserController: |
68 (std::unique_ptr<ChooserController>)chooserController; | 68 (std::unique_ptr<ChooserController>)chooserController; |
69 | 69 |
70 // Creates the title for the chooser. | 70 // Creates the title for the chooser. |
71 - (base::scoped_nsobject<NSTextField>)createChooserTitle:(NSString*)title; | 71 - (base::scoped_nsobject<NSTextField>)createChooserTitle:(NSString*)title; |
72 | 72 |
| 73 // Creates a table row view for the chooser. |
| 74 - (NSView*)createTableRowView:(NSInteger)rowIndex; |
| 75 |
| 76 // The height of a table row view. |
| 77 - (CGFloat)tableRowViewHeight:(NSInteger)row; |
| 78 |
73 // Creates a button with |title|. | 79 // Creates a button with |title|. |
74 - (base::scoped_nsobject<NSButton>)createButtonWithTitle:(NSString*)title; | 80 - (base::scoped_nsobject<NSButton>)createButtonWithTitle:(NSString*)title; |
75 | 81 |
76 // Creates the "Connect" button. | 82 // Creates the "Connect" button. |
77 - (base::scoped_nsobject<NSButton>)createConnectButton; | 83 - (base::scoped_nsobject<NSButton>)createConnectButton; |
78 | 84 |
79 // Creates the "Cancel" button. | 85 // Creates the "Cancel" button. |
80 - (base::scoped_nsobject<NSButton>)createCancelButton; | 86 - (base::scoped_nsobject<NSButton>)createCancelButton; |
81 | 87 |
82 // Creates the separator. | 88 // Creates the separator. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 151 |
146 // Called when the chooser is closed. | 152 // Called when the chooser is closed. |
147 - (void)close; | 153 - (void)close; |
148 | 154 |
149 // Called when "Re-scan" button is pressed. | 155 // Called when "Re-scan" button is pressed. |
150 - (void)onRescan:(id)sender; | 156 - (void)onRescan:(id)sender; |
151 | 157 |
152 // Called when the "Get help" button is pressed. | 158 // Called when the "Get help" button is pressed. |
153 - (void)onHelpPressed:(id)sender; | 159 - (void)onHelpPressed:(id)sender; |
154 | 160 |
| 161 // Gets the image from table row view. For testing only. |
| 162 - (NSImageView*)tableRowViewImage:(NSInteger)row; |
| 163 |
| 164 // Gets the text from table row view. For testing only. |
| 165 - (NSTextField*)tableRowViewText:(NSInteger)row; |
| 166 |
155 @end | 167 @end |
156 | 168 |
157 #endif // CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_ | 169 #endif // CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_COCOA_H_ |
OLD | NEW |