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

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

Issue 7835039: Implement the inline extensions/apps install UI for Cocoa. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_nsobject.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 #import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
Nico 2011/09/06 01:04:00 Looks unused? Move to mm
Mihai Parparita -not on Chrome 2011/09/06 01:25:59 Done.
17 18
18 class Extension; 19 class Extension;
19 class Profile; 20 class Profile;
20 21
21 // A controller for dialog to let the user install an extension. Created by 22 // A controller for dialog to let the user install an extension. Created by
22 // CrxInstaller. 23 // CrxInstaller.
23 @interface ExtensionInstallDialogController : NSWindowController { 24 @interface ExtensionInstallDialogController : NSWindowController {
24 @private 25 @private
25 IBOutlet NSImageView* iconView_; 26 IBOutlet NSImageView* iconView_;
26 IBOutlet NSTextField* titleField_; 27 IBOutlet NSTextField* titleField_;
28 IBOutlet NSButton* cancelButton_;
29 IBOutlet NSButton* okButton_;
30
31 // Present only when the dialog has permission warnings to display.
27 IBOutlet NSTextField* subtitleField_; 32 IBOutlet NSTextField* subtitleField_;
28 IBOutlet NSTextField* warningsField_; 33 IBOutlet NSTextField* warningsField_;
29 IBOutlet NSBox* warningsBox_; 34
30 IBOutlet NSButton* cancelButton_; 35 // Present only in the inline install dialog.
31 IBOutlet NSButton* okButton_; 36 IBOutlet NSBox* warningsSeparator_; // Only when there are permissions.
37 IBOutlet NSView* ratingStars_;
38 IBOutlet NSTextField* ratingCountField_;
39 IBOutlet NSTextField* userCountField_;
32 40
33 NSWindow* parentWindow_; // weak 41 NSWindow* parentWindow_; // weak
34 Profile* profile_; // weak 42 Profile* profile_; // weak
35 ExtensionInstallUI::Delegate* delegate_; // weak 43 ExtensionInstallUI::Delegate* delegate_; // weak
36 44 const Extension* extension_; // weak
37 scoped_nsobject<NSString> title_; 45 scoped_ptr<ExtensionInstallUI::Prompt> prompt_;
38 scoped_nsobject<NSString> warnings_;
39 scoped_nsobject<NSString> button_;
40 scoped_nsobject<NSString> cancel_button_;
41 scoped_nsobject<NSString> subtitle_;
42 SkBitmap icon_; 46 SkBitmap icon_;
43 } 47 }
44 48
49 // For unit test use only
45 @property(nonatomic, readonly) NSImageView* iconView; 50 @property(nonatomic, readonly) NSImageView* iconView;
46 @property(nonatomic, readonly) NSTextField* titleField; 51 @property(nonatomic, readonly) NSTextField* titleField;
47 @property(nonatomic, readonly) NSTextField* subtitleField; 52 @property(nonatomic, readonly) NSTextField* subtitleField;
48 @property(nonatomic, readonly) NSTextField* warningsField; 53 @property(nonatomic, readonly) NSTextField* warningsField;
49 @property(nonatomic, readonly) NSBox* warningsBox;
50 @property(nonatomic, readonly) NSButton* cancelButton; 54 @property(nonatomic, readonly) NSButton* cancelButton;
51 @property(nonatomic, readonly) NSButton* okButton; 55 @property(nonatomic, readonly) NSButton* okButton;
56 @property(nonatomic, readonly) NSBox* warningsSeparator;
57 @property(nonatomic, readonly) NSView* ratingStars;
58 @property(nonatomic, readonly) NSTextField* ratingCountField;
59 @property(nonatomic, readonly) NSTextField* userCountField;
52 60
53 - (id)initWithParentWindow:(NSWindow*)window 61 - (id)initWithParentWindow:(NSWindow*)window
54 profile:(Profile*)profile 62 profile:(Profile*)profile
55 extension:(const Extension*)extension 63 extension:(const Extension*)extension
56 delegate:(ExtensionInstallUI::Delegate*)delegate 64 delegate:(ExtensionInstallUI::Delegate*)delegate
57 icon:(SkBitmap*)bitmap 65 icon:(SkBitmap*)bitmap
58 prompt:(const ExtensionInstallUI::Prompt&)prompt; 66 prompt:(const ExtensionInstallUI::Prompt&)prompt;
59 - (void)runAsModalSheet; 67 - (void)runAsModalSheet;
68 - (IBAction)storeLinkClicked:(id)sender; // Callback for "View details" link.
60 - (IBAction)cancel:(id)sender; 69 - (IBAction)cancel:(id)sender;
61 - (IBAction)ok:(id)sender; 70 - (IBAction)ok:(id)sender;
62 71
63 @end 72 @end
64 73
65 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLLE R_H_ 74 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698