OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 8 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
9 | 9 |
10 class AppListControllerDelegate; | 10 class AppListControllerDelegate; |
11 class Profile; | 11 class Profile; |
12 | 12 |
13 // ExtensionUninstaller runs the extension uninstall flow. It shows the | 13 // ExtensionUninstaller runs the extension uninstall flow. It shows the |
14 // extension uninstall dialog and wait for user to confirm or cancel the | 14 // extension uninstall dialog and wait for user to confirm or cancel the |
15 // uninstall. | 15 // uninstall. |
16 class ExtensionUninstaller | 16 class ExtensionUninstaller |
17 : public extensions::ExtensionUninstallDialog::Delegate { | 17 : public extensions::ExtensionUninstallDialog::Delegate { |
18 public: | 18 public: |
19 ExtensionUninstaller(Profile* profile, | 19 ExtensionUninstaller(Profile* profile, |
20 const std::string& extension_id, | 20 const std::string& extension_id, |
21 AppListControllerDelegate* controller); | 21 AppListControllerDelegate* controller); |
22 virtual ~ExtensionUninstaller(); | 22 ~ExtensionUninstaller() override; |
23 | 23 |
24 void Run(); | 24 void Run(); |
25 | 25 |
26 private: | 26 private: |
27 // Overridden from ExtensionUninstallDialog::Delegate: | 27 // Overridden from ExtensionUninstallDialog::Delegate: |
28 virtual void ExtensionUninstallAccepted() override; | 28 void ExtensionUninstallAccepted() override; |
29 virtual void ExtensionUninstallCanceled() override; | 29 void ExtensionUninstallCanceled() override; |
30 void CleanUp(); | 30 void CleanUp(); |
31 | 31 |
32 Profile* profile_; | 32 Profile* profile_; |
33 std::string app_id_; | 33 std::string app_id_; |
34 AppListControllerDelegate* controller_; | 34 AppListControllerDelegate* controller_; |
35 scoped_ptr<extensions::ExtensionUninstallDialog> dialog_; | 35 scoped_ptr<extensions::ExtensionUninstallDialog> dialog_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstaller); | 37 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstaller); |
38 }; | 38 }; |
39 | 39 |
40 | 40 |
41 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_ | 41 #endif // CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_ |
OLD | NEW |