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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced + mac fix Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
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_DIALOG_CONTROLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLER_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #import <Cocoa/Cocoa.h> 11 #import <Cocoa/Cocoa.h>
12 12
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 #include "chrome/browser/extensions/extension_install_ui.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 class Profile; 18 class Profile;
19 19
20 // Displays the extension or bundle install prompt, and notifies the 20 // Displays the extension or bundle install prompt, and notifies the
21 // ExtensionInstallUI::Delegate of success or failure. 21 // ExtensionInstallPrompt::Delegate of success or failure.
22 @interface ExtensionInstallDialogController : NSWindowController { 22 @interface ExtensionInstallDialogController : NSWindowController {
23 @private 23 @private
24 IBOutlet NSImageView* iconView_; 24 IBOutlet NSImageView* iconView_;
25 IBOutlet NSTextField* titleField_; 25 IBOutlet NSTextField* titleField_;
26 IBOutlet NSTextField* itemsField_; 26 IBOutlet NSTextField* itemsField_;
27 IBOutlet NSButton* cancelButton_; 27 IBOutlet NSButton* cancelButton_;
28 IBOutlet NSButton* okButton_; 28 IBOutlet NSButton* okButton_;
29 29
30 // Present only when the dialog has permission warnings to display. 30 // Present only when the dialog has permission warnings to display.
31 IBOutlet NSTextField* subtitleField_; 31 IBOutlet NSTextField* subtitleField_;
32 IBOutlet NSTextField* warningsField_; 32 IBOutlet NSTextField* warningsField_;
33 33
34 // Present only in the inline install dialog. 34 // Present only in the inline install dialog.
35 IBOutlet NSBox* warningsSeparator_; // Only when there are permissions. 35 IBOutlet NSBox* warningsSeparator_; // Only when there are permissions.
36 IBOutlet NSView* ratingStars_; 36 IBOutlet NSView* ratingStars_;
37 IBOutlet NSTextField* ratingCountField_; 37 IBOutlet NSTextField* ratingCountField_;
38 IBOutlet NSTextField* userCountField_; 38 IBOutlet NSTextField* userCountField_;
39 39
40 NSWindow* parentWindow_; // weak 40 NSWindow* parentWindow_; // weak
41 Profile* profile_; // weak 41 Profile* profile_; // weak
42 ExtensionInstallUI::Delegate* delegate_; // weak 42 ExtensionInstallPrompt::Delegate* delegate_; // weak
43 scoped_ptr<ExtensionInstallUI::Prompt> prompt_; 43 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt_;
44 } 44 }
45 45
46 // For unit test use only 46 // For unit test use only
47 @property(nonatomic, readonly) NSImageView* iconView; 47 @property(nonatomic, readonly) NSImageView* iconView;
48 @property(nonatomic, readonly) NSTextField* titleField; 48 @property(nonatomic, readonly) NSTextField* titleField;
49 @property(nonatomic, readonly) NSTextField* itemsField; 49 @property(nonatomic, readonly) NSTextField* itemsField;
50 @property(nonatomic, readonly) NSTextField* subtitleField; 50 @property(nonatomic, readonly) NSTextField* subtitleField;
51 @property(nonatomic, readonly) NSTextField* warningsField; 51 @property(nonatomic, readonly) NSTextField* warningsField;
52 @property(nonatomic, readonly) NSButton* cancelButton; 52 @property(nonatomic, readonly) NSButton* cancelButton;
53 @property(nonatomic, readonly) NSButton* okButton; 53 @property(nonatomic, readonly) NSButton* okButton;
54 @property(nonatomic, readonly) NSBox* warningsSeparator; 54 @property(nonatomic, readonly) NSBox* warningsSeparator;
55 @property(nonatomic, readonly) NSView* ratingStars; 55 @property(nonatomic, readonly) NSView* ratingStars;
56 @property(nonatomic, readonly) NSTextField* ratingCountField; 56 @property(nonatomic, readonly) NSTextField* ratingCountField;
57 @property(nonatomic, readonly) NSTextField* userCountField; 57 @property(nonatomic, readonly) NSTextField* userCountField;
58 58
59 - (id)initWithParentWindow:(NSWindow*)window 59 - (id)initWithParentWindow:(NSWindow*)window
60 profile:(Profile*)profile 60 profile:(Profile*)profile
61 delegate:(ExtensionInstallUI::Delegate*)delegate 61 delegate:(ExtensionInstallPrompt::Delegate*)delegate
62 prompt:(const ExtensionInstallUI::Prompt&)prompt; 62 prompt:(const ExtensionInstallPrompt::Prompt&)prompt;
63 - (void)runAsModalSheet; 63 - (void)runAsModalSheet;
64 - (IBAction)storeLinkClicked:(id)sender; // Callback for "View details" link. 64 - (IBAction)storeLinkClicked:(id)sender; // Callback for "View details" link.
65 - (IBAction)cancel:(id)sender; 65 - (IBAction)cancel:(id)sender;
66 - (IBAction)ok:(id)sender; 66 - (IBAction)ok:(id)sender;
67 67
68 @end 68 @end
69 69
70 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLLE R_H_ 70 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLLE R_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698