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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util_mac.h" | 9 #include "app/l10n_util_mac.h" |
10 #include "app/resource_bundle.h" | |
11 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
12 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/extensions/extension_install_ui.h" | 12 #include "chrome/browser/extensions/extension_install_ui.h" |
14 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
15 #include "grit/browser_resources.h" | 14 #include "grit/browser_resources.h" |
16 #include "grit/chromium_strings.h" | 15 #include "grit/chromium_strings.h" |
17 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
18 #include "skia/ext/skia_utils_mac.h" | 17 #include "skia/ext/skia_utils_mac.h" |
| 18 #include "ui/base/resource/resource_bundle.h" |
19 | 19 |
20 class Profile; | 20 class Profile; |
21 | 21 |
22 void ExtensionInstallUI::ShowExtensionInstallUIPromptImpl( | 22 void ExtensionInstallUI::ShowExtensionInstallUIPromptImpl( |
23 Profile* profile, | 23 Profile* profile, |
24 Delegate* delegate, | 24 Delegate* delegate, |
25 const Extension* extension, | 25 const Extension* extension, |
26 SkBitmap* icon, | 26 SkBitmap* icon, |
27 ExtensionInstallUI::PromptType type) { | 27 ExtensionInstallUI::PromptType type) { |
28 NSAlert* alert = [[[NSAlert alloc] init] autorelease]; | 28 NSAlert* alert = [[[NSAlert alloc] init] autorelease]; |
(...skipping 13 matching lines...) Expand all Loading... |
42 UTF8ToUTF16(extension->name()))]; | 42 UTF8ToUTF16(extension->name()))]; |
43 [alert setAlertStyle:NSWarningAlertStyle]; | 43 [alert setAlertStyle:NSWarningAlertStyle]; |
44 [alert setIcon:gfx::SkBitmapToNSImage(*icon)]; | 44 [alert setIcon:gfx::SkBitmapToNSImage(*icon)]; |
45 | 45 |
46 if ([alert runModal] == NSAlertFirstButtonReturn) { | 46 if ([alert runModal] == NSAlertFirstButtonReturn) { |
47 delegate->InstallUIProceed(); | 47 delegate->InstallUIProceed(); |
48 } else { | 48 } else { |
49 delegate->InstallUIAbort(); | 49 delegate->InstallUIAbort(); |
50 } | 50 } |
51 } | 51 } |
OLD | NEW |