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

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

Issue 9460045: Add Mac interface for installing bundles of extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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_ui.h"
16 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
17 17
18 class Extension; 18 class Extension;
19 class Profile; 19 class Profile;
20 20
21 // A controller for dialog to let the user install an extension. Created by 21 // Displays the extension or bundle install prompt, and notifies the
22 // CrxInstaller. 22 // ExtensionInstallUI::Delegate of success or failure.
23 @interface ExtensionInstallDialogController : NSWindowController { 23 @interface ExtensionInstallDialogController : NSWindowController {
24 @private 24 @private
25 IBOutlet NSImageView* iconView_; 25 IBOutlet NSImageView* iconView_;
26 IBOutlet NSTextField* titleField_; 26 IBOutlet NSTextField* titleField_;
27 IBOutlet NSTextField* itemsField_;
27 IBOutlet NSButton* cancelButton_; 28 IBOutlet NSButton* cancelButton_;
28 IBOutlet NSButton* okButton_; 29 IBOutlet NSButton* okButton_;
29 30
30 // Present only when the dialog has permission warnings to display. 31 // Present only when the dialog has permission warnings to display.
31 IBOutlet NSTextField* subtitleField_; 32 IBOutlet NSTextField* subtitleField_;
32 IBOutlet NSTextField* warningsField_; 33 IBOutlet NSTextField* warningsField_;
33 34
34 // Present only in the inline install dialog. 35 // Present only in the inline install dialog.
35 IBOutlet NSBox* warningsSeparator_; // Only when there are permissions. 36 IBOutlet NSBox* warningsSeparator_; // Only when there are permissions.
36 IBOutlet NSView* ratingStars_; 37 IBOutlet NSView* ratingStars_;
37 IBOutlet NSTextField* ratingCountField_; 38 IBOutlet NSTextField* ratingCountField_;
38 IBOutlet NSTextField* userCountField_; 39 IBOutlet NSTextField* userCountField_;
39 40
40 NSWindow* parentWindow_; // weak 41 NSWindow* parentWindow_; // weak
41 Profile* profile_; // weak 42 Profile* profile_; // weak
42 ExtensionInstallUI::Delegate* delegate_; // weak 43 ExtensionInstallUI::Delegate* delegate_; // weak
43 scoped_ptr<ExtensionInstallUI::Prompt> prompt_; 44 scoped_ptr<ExtensionInstallUI::Prompt> prompt_;
44 } 45 }
45 46
46 // For unit test use only 47 // For unit test use only
47 @property(nonatomic, readonly) NSImageView* iconView; 48 @property(nonatomic, readonly) NSImageView* iconView;
48 @property(nonatomic, readonly) NSTextField* titleField; 49 @property(nonatomic, readonly) NSTextField* titleField;
50 @property(nonatomic, readonly) NSTextField* itemsField;
49 @property(nonatomic, readonly) NSTextField* subtitleField; 51 @property(nonatomic, readonly) NSTextField* subtitleField;
50 @property(nonatomic, readonly) NSTextField* warningsField; 52 @property(nonatomic, readonly) NSTextField* warningsField;
51 @property(nonatomic, readonly) NSButton* cancelButton; 53 @property(nonatomic, readonly) NSButton* cancelButton;
52 @property(nonatomic, readonly) NSButton* okButton; 54 @property(nonatomic, readonly) NSButton* okButton;
53 @property(nonatomic, readonly) NSBox* warningsSeparator; 55 @property(nonatomic, readonly) NSBox* warningsSeparator;
54 @property(nonatomic, readonly) NSView* ratingStars; 56 @property(nonatomic, readonly) NSView* ratingStars;
55 @property(nonatomic, readonly) NSTextField* ratingCountField; 57 @property(nonatomic, readonly) NSTextField* ratingCountField;
56 @property(nonatomic, readonly) NSTextField* userCountField; 58 @property(nonatomic, readonly) NSTextField* userCountField;
57 59
58 - (id)initWithParentWindow:(NSWindow*)window 60 - (id)initWithParentWindow:(NSWindow*)window
59 profile:(Profile*)profile 61 profile:(Profile*)profile
60 delegate:(ExtensionInstallUI::Delegate*)delegate 62 delegate:(ExtensionInstallUI::Delegate*)delegate
61 prompt:(const ExtensionInstallUI::Prompt&)prompt; 63 prompt:(const ExtensionInstallUI::Prompt&)prompt;
62 - (void)runAsModalSheet; 64 - (void)runAsModalSheet;
63 - (IBAction)storeLinkClicked:(id)sender; // Callback for "View details" link. 65 - (IBAction)storeLinkClicked:(id)sender; // Callback for "View details" link.
64 - (IBAction)cancel:(id)sender; 66 - (IBAction)cancel:(id)sender;
65 - (IBAction)ok:(id)sender; 67 - (IBAction)ok:(id)sender;
66 68
67 @end 69 @end
68 70
69 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLLE R_H_ 71 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698