OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_EXTENSION_INSTALL_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
11 | 11 |
12 #include "base/memory/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "chrome/browser/extensions/extension_install_prompt.h" | 15 #include "chrome/browser/extensions/extension_install_prompt.h" |
16 #include "ui/gfx/image/image_skia.h" | 16 #include "ui/gfx/image/image_skia.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 class PageNavigator; | 19 class PageNavigator; |
20 } | 20 } |
21 | 21 |
22 // Displays the extension or bundle install prompt, and notifies the | 22 // Displays the extension or bundle install prompt, and notifies the |
(...skipping 15 matching lines...) Expand all Loading... |
38 IBOutlet NSBox* warningsSeparator_; // Only when there are permissions. | 38 IBOutlet NSBox* warningsSeparator_; // Only when there are permissions. |
39 IBOutlet NSView* ratingStars_; | 39 IBOutlet NSView* ratingStars_; |
40 IBOutlet NSTextField* ratingCountField_; | 40 IBOutlet NSTextField* ratingCountField_; |
41 IBOutlet NSTextField* userCountField_; | 41 IBOutlet NSTextField* userCountField_; |
42 IBOutlet NSButton* storeLinkButton_; | 42 IBOutlet NSButton* storeLinkButton_; |
43 | 43 |
44 content::PageNavigator* navigator_; // weak | 44 content::PageNavigator* navigator_; // weak |
45 ExtensionInstallPrompt::Delegate* delegate_; // weak | 45 ExtensionInstallPrompt::Delegate* delegate_; // weak |
46 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt_; | 46 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt_; |
47 | 47 |
48 scoped_nsobject<NSArray> warnings_; | 48 base::scoped_nsobject<NSArray> warnings_; |
49 BOOL isComputingRowHeight_; | 49 BOOL isComputingRowHeight_; |
50 } | 50 } |
51 | 51 |
52 // For unit test use only. | 52 // For unit test use only. |
53 @property(nonatomic, readonly) NSImageView* iconView; | 53 @property(nonatomic, readonly) NSImageView* iconView; |
54 @property(nonatomic, readonly) NSTextField* titleField; | 54 @property(nonatomic, readonly) NSTextField* titleField; |
55 @property(nonatomic, readonly) NSTextField* itemsField; | 55 @property(nonatomic, readonly) NSTextField* itemsField; |
56 @property(nonatomic, readonly) NSButton* cancelButton; | 56 @property(nonatomic, readonly) NSButton* cancelButton; |
57 @property(nonatomic, readonly) NSButton* okButton; | 57 @property(nonatomic, readonly) NSButton* okButton; |
58 @property(nonatomic, readonly) NSOutlineView* outlineView; | 58 @property(nonatomic, readonly) NSOutlineView* outlineView; |
59 @property(nonatomic, readonly) NSBox* warningsSeparator; | 59 @property(nonatomic, readonly) NSBox* warningsSeparator; |
60 @property(nonatomic, readonly) NSView* ratingStars; | 60 @property(nonatomic, readonly) NSView* ratingStars; |
61 @property(nonatomic, readonly) NSTextField* ratingCountField; | 61 @property(nonatomic, readonly) NSTextField* ratingCountField; |
62 @property(nonatomic, readonly) NSTextField* userCountField; | 62 @property(nonatomic, readonly) NSTextField* userCountField; |
63 @property(nonatomic, readonly) NSButton* storeLinkButton; | 63 @property(nonatomic, readonly) NSButton* storeLinkButton; |
64 | 64 |
65 - (id)initWithNavigator:(content::PageNavigator*)navigator | 65 - (id)initWithNavigator:(content::PageNavigator*)navigator |
66 delegate:(ExtensionInstallPrompt::Delegate*)delegate | 66 delegate:(ExtensionInstallPrompt::Delegate*)delegate |
67 prompt:(const ExtensionInstallPrompt::Prompt&)prompt; | 67 prompt:(const ExtensionInstallPrompt::Prompt&)prompt; |
68 - (IBAction)storeLinkClicked:(id)sender; // Callback for "View details" link. | 68 - (IBAction)storeLinkClicked:(id)sender; // Callback for "View details" link. |
69 - (IBAction)cancel:(id)sender; | 69 - (IBAction)cancel:(id)sender; |
70 - (IBAction)ok:(id)sender; | 70 - (IBAction)ok:(id)sender; |
71 | 71 |
72 @end | 72 @end |
73 | 73 |
74 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_VIEW_CONTROLLER_
H_ | 74 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_VIEW_CONTROLLER_
H_ |
OLD | NEW |