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 10 matching lines...) Expand all Loading... |
21 // The Cocoa implementation of ExtensionUninstallDialog. This has a less | 21 // The Cocoa implementation of ExtensionUninstallDialog. This has a less |
22 // complex life cycle than the Views and GTK implementations because the | 22 // complex life cycle than the Views and GTK implementations because the |
23 // dialog blocks the page from navigating away and destroying the dialog, | 23 // dialog blocks the page from navigating away and destroying the dialog, |
24 // so there's no way for the dialog to outlive its delegate. | 24 // so there's no way for the dialog to outlive its delegate. |
25 class ExtensionUninstallDialogCocoa | 25 class ExtensionUninstallDialogCocoa |
26 : public extensions::ExtensionUninstallDialog { | 26 : public extensions::ExtensionUninstallDialog { |
27 public: | 27 public: |
28 ExtensionUninstallDialogCocoa(Profile* profile, | 28 ExtensionUninstallDialogCocoa(Profile* profile, |
29 gfx::NativeWindow parent, | 29 gfx::NativeWindow parent, |
30 Delegate* delegate); | 30 Delegate* delegate); |
31 virtual ~ExtensionUninstallDialogCocoa() override; | 31 ~ExtensionUninstallDialogCocoa() override; |
32 | 32 |
33 private: | 33 private: |
34 virtual 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, | 39 gfx::NativeWindow parent, |
40 extensions::ExtensionUninstallDialog::Delegate* delegate) | 40 extensions::ExtensionUninstallDialog::Delegate* delegate) |
41 : extensions::ExtensionUninstallDialog(profile, parent, delegate) { | 41 : extensions::ExtensionUninstallDialog(profile, parent, delegate) { |
42 } | 42 } |
43 | 43 |
44 ExtensionUninstallDialogCocoa::~ExtensionUninstallDialogCocoa() {} | 44 ExtensionUninstallDialogCocoa::~ExtensionUninstallDialogCocoa() {} |
(...skipping 23 matching lines...) Expand all Loading... |
68 | 68 |
69 } // namespace | 69 } // namespace |
70 | 70 |
71 // static | 71 // static |
72 extensions::ExtensionUninstallDialog* | 72 extensions::ExtensionUninstallDialog* |
73 extensions::ExtensionUninstallDialog::Create(Profile* profile, | 73 extensions::ExtensionUninstallDialog::Create(Profile* profile, |
74 gfx::NativeWindow parent, | 74 gfx::NativeWindow parent, |
75 Delegate* delegate) { | 75 Delegate* delegate) { |
76 return new ExtensionUninstallDialogCocoa(profile, parent, delegate); | 76 return new ExtensionUninstallDialogCocoa(profile, parent, delegate); |
77 } | 77 } |
OLD | NEW |