summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h')
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h
new file mode 100644
index 0000000..8c7818d
--- /dev/null
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2011 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_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLER_H_
+#define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLER_H_
+#pragma once
+
+#include <vector>
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/memory/scoped_nsobject.h"
+#include "base/string16.h"
+#include "chrome/browser/extensions/extension_install_ui.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+
+class Extension;
+class Profile;
+
+// A controller for dialog to let the user install an extension. Created by
+// CrxInstaller.
+@interface ExtensionInstallDialogController : NSWindowController {
+@private
+ IBOutlet NSImageView* iconView_;
+ IBOutlet NSTextField* titleField_;
+ IBOutlet NSTextField* subtitleField_;
+ IBOutlet NSTextField* warningsField_;
+ IBOutlet NSBox* warningsBox_;
+ IBOutlet NSButton* cancelButton_;
+ IBOutlet NSButton* okButton_;
+
+ NSWindow* parentWindow_; // weak
+ Profile* profile_; // weak
+ ExtensionInstallUI::Delegate* delegate_; // weak
+
+ scoped_nsobject<NSString> title_;
+ scoped_nsobject<NSString> warnings_;
+ scoped_nsobject<NSString> button_;
+ scoped_nsobject<NSString> subtitle_;
+ SkBitmap icon_;
+}
+
+@property(nonatomic, readonly) NSImageView* iconView;
+@property(nonatomic, readonly) NSTextField* titleField;
+@property(nonatomic, readonly) NSTextField* subtitleField;
+@property(nonatomic, readonly) NSTextField* warningsField;
+@property(nonatomic, readonly) NSBox* warningsBox;
+@property(nonatomic, readonly) NSButton* cancelButton;
+@property(nonatomic, readonly) NSButton* okButton;
+
+- (id)initWithParentWindow:(NSWindow*)window
+ profile:(Profile*)profile
+ extension:(const Extension*)extension
+ delegate:(ExtensionInstallUI::Delegate*)delegate
+ icon:(SkBitmap*)bitmap
+ warnings:(const std::vector<string16>&)warnings
+ type:(ExtensionInstallUI::PromptType)type;
+- (void)runAsModalSheet;
+- (IBAction)cancel:(id)sender;
+- (IBAction)ok:(id)sender;
+
+@end
+
+#endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_INSTALL_DIALOG_CONTROLLER_H_