OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import "chrome/browser/ui/cocoa/extensions/extension_install_prompt_controller.
h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_install_prompt_controller.
h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/l10n_util_mac.h" | 8 #include "app/l10n_util_mac.h" |
9 #include "base/mac_util.h" | 9 #include "base/mac/mac_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_list.h" | 14 #include "chrome/browser/ui/browser_list.h" |
15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
18 #include "skia/ext/skia_utils_mac.h" | 18 #include "skia/ext/skia_utils_mac.h" |
19 | 19 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 profile:(Profile*)profile | 60 profile:(Profile*)profile |
61 extension:(const Extension*)extension | 61 extension:(const Extension*)extension |
62 delegate:(ExtensionInstallUI::Delegate*)delegate | 62 delegate:(ExtensionInstallUI::Delegate*)delegate |
63 icon:(SkBitmap*)icon | 63 icon:(SkBitmap*)icon |
64 warnings:(const std::vector<string16>&)warnings { | 64 warnings:(const std::vector<string16>&)warnings { |
65 NSString* nibpath = nil; | 65 NSString* nibpath = nil; |
66 | 66 |
67 // We use a different XIB in the case of no warnings, that is a little bit | 67 // We use a different XIB in the case of no warnings, that is a little bit |
68 // more nicely laid out. | 68 // more nicely laid out. |
69 if (warnings.empty()) { | 69 if (warnings.empty()) { |
70 nibpath = [mac_util::MainAppBundle() | 70 nibpath = [base::mac::MainAppBundle() |
71 pathForResource:@"ExtensionInstallPromptNoWarnings" | 71 pathForResource:@"ExtensionInstallPromptNoWarnings" |
72 ofType:@"nib"]; | 72 ofType:@"nib"]; |
73 } else { | 73 } else { |
74 nibpath = [mac_util::MainAppBundle() | 74 nibpath = [base::mac::MainAppBundle() |
75 pathForResource:@"ExtensionInstallPrompt" | 75 pathForResource:@"ExtensionInstallPrompt" |
76 ofType:@"nib"]; | 76 ofType:@"nib"]; |
77 } | 77 } |
78 | 78 |
79 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 79 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
80 parentWindow_ = window; | 80 parentWindow_ = window; |
81 profile_ = profile; | 81 profile_ = profile; |
82 icon_ = *icon; | 82 icon_ = *icon; |
83 delegate_ = delegate; | 83 delegate_ = delegate; |
84 | 84 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 [[ExtensionInstallPromptController alloc] | 208 [[ExtensionInstallPromptController alloc] |
209 initWithParentWindow:native_window | 209 initWithParentWindow:native_window |
210 profile:profile | 210 profile:profile |
211 extension:extension | 211 extension:extension |
212 delegate:delegate | 212 delegate:delegate |
213 icon:icon | 213 icon:icon |
214 warnings:warnings]; | 214 warnings:warnings]; |
215 | 215 |
216 [controller runAsModalSheet]; | 216 [controller runAsModalSheet]; |
217 } | 217 } |
OLD | NEW |