Chromium Code Reviews| Index: chrome/browser/ui/cocoa/chooser_content_view.h |
| diff --git a/chrome/browser/ui/cocoa/chooser_content_view.h b/chrome/browser/ui/cocoa/chooser_content_view.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a48676b5bffe39b12038aaec1b8c6a56d26e6dac |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/chooser_content_view.h |
| @@ -0,0 +1,64 @@ |
| +// 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_CHOOSER_CONTENT_VIEW_H_ |
| +#define CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_H_ |
| + |
| +#import <Cocoa/Cocoa.h> |
| + |
| +#include "base/mac/scoped_nsobject.h" |
| + |
| +// A chooser content view class that user can select an option. |
| +@interface ChooserContentView : NSView { |
| + @private |
| + base::scoped_nsobject<NSTextField> titleView_; |
| + base::scoped_nsobject<NSScrollView> scrollView_; |
| + base::scoped_nsobject<NSTableColumn> tableColumn_; |
| + base::scoped_nsobject<NSTableView> tableView_; |
| + base::scoped_nsobject<NSButton> connectButton_; |
| + base::scoped_nsobject<NSButton> cancelButton_; |
| + base::scoped_nsobject<NSBox> separator_; |
| + base::scoped_nsobject<NSTextField> message_; |
| + base::scoped_nsobject<NSButton> helpButton_; |
| +} |
| + |
| +// Designated initializer. |
| +- (id)initWithChooserTitle:(NSString*)chooserTitle; |
|
Robert Sesek
2016/05/23 16:46:34
id -> instancetype
juncai
2016/05/23 17:48:01
Done.
|
| + |
| +// Creates the title for the chooser. |
| +- (base::scoped_nsobject<NSTextField>)createChooserTitle:(NSString*)title; |
| + |
| +// Creates a button with |title|. |
| +- (base::scoped_nsobject<NSButton>)createButtonWithTitle:(NSString*)title; |
| + |
| +// Creates the "Connect" button. |
| +- (base::scoped_nsobject<NSButton>)createConnectButton; |
| + |
| +// Creates the "Cancel" button. |
| +- (base::scoped_nsobject<NSButton>)createCancelButton; |
| + |
| +// Creates the separator. |
| +- (base::scoped_nsobject<NSBox>)createSeparator; |
| + |
| +// Creates the message. |
| +- (base::scoped_nsobject<NSTextField>)createMessage; |
| + |
| +// Creates the "Get help" button. |
| +- (base::scoped_nsobject<NSButton>)createHelpButton; |
| + |
| +// Gets the table view for the chooser. |
| +- (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.
|
| + |
| +// Gets the "Connect" button. |
| +- (NSButton*)getConnectButton; |
| + |
| +// Gets the "Cancel" button. |
| +- (NSButton*)getCancelButton; |
| + |
| +// Gets the "Get help" button. |
| +- (NSButton*)getHelpButton; |
| + |
| +@end |
| + |
| +#endif // CHROME_BROWSER_UI_COCOA_CHOOSER_CONTENT_VIEW_H_ |