blob: 8c7818df85075bd871896cd40dd9a23a8aba476c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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_
|