OLD | NEW |
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 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 5 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 gfx::NativeWindow parent, | 29 gfx::NativeWindow parent, |
30 Delegate* delegate); | 30 Delegate* delegate); |
31 ~ExtensionUninstallDialogCocoa() override; | 31 ~ExtensionUninstallDialogCocoa() override; |
32 | 32 |
33 private: | 33 private: |
34 void Show() override; | 34 void Show() override; |
35 }; | 35 }; |
36 | 36 |
37 ExtensionUninstallDialogCocoa::ExtensionUninstallDialogCocoa( | 37 ExtensionUninstallDialogCocoa::ExtensionUninstallDialogCocoa( |
38 Profile* profile, | 38 Profile* profile, |
39 gfx::NativeWindow parent, | |
40 extensions::ExtensionUninstallDialog::Delegate* delegate) | 39 extensions::ExtensionUninstallDialog::Delegate* delegate) |
41 : extensions::ExtensionUninstallDialog(profile, parent, delegate) { | 40 : extensions::ExtensionUninstallDialog(profile, delegate) { |
42 } | 41 } |
43 | 42 |
44 ExtensionUninstallDialogCocoa::~ExtensionUninstallDialogCocoa() {} | 43 ExtensionUninstallDialogCocoa::~ExtensionUninstallDialogCocoa() {} |
45 | 44 |
46 void ExtensionUninstallDialogCocoa::Show() { | 45 void ExtensionUninstallDialogCocoa::Show() { |
47 NSAlert* alert = [[[NSAlert alloc] init] autorelease]; | 46 NSAlert* alert = [[[NSAlert alloc] init] autorelease]; |
48 | 47 |
49 NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString( | 48 NSButton* continueButton = [alert addButtonWithTitle:l10n_util::GetNSString( |
50 IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON)]; | 49 IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON)]; |
51 NSButton* cancelButton = [alert addButtonWithTitle:l10n_util::GetNSString( | 50 NSButton* cancelButton = [alert addButtonWithTitle:l10n_util::GetNSString( |
(...skipping 14 matching lines...) Expand all Loading... |
66 delegate_->ExtensionUninstallCanceled(); | 65 delegate_->ExtensionUninstallCanceled(); |
67 } | 66 } |
68 | 67 |
69 } // namespace | 68 } // namespace |
70 | 69 |
71 // static | 70 // static |
72 extensions::ExtensionUninstallDialog* | 71 extensions::ExtensionUninstallDialog* |
73 extensions::ExtensionUninstallDialog::Create(Profile* profile, | 72 extensions::ExtensionUninstallDialog::Create(Profile* profile, |
74 gfx::NativeWindow parent, | 73 gfx::NativeWindow parent, |
75 Delegate* delegate) { | 74 Delegate* delegate) { |
76 return new ExtensionUninstallDialogCocoa(profile, parent, delegate); | 75 return new ExtensionUninstallDialogCocoa(profile, delegate); |
77 } | 76 } |
OLD | NEW |