| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // 2) Handle the load icon response and show the UI (OnImageLoaded). | 54 // 2) Handle the load icon response and show the UI (OnImageLoaded). |
| 55 void ConfirmUninstall(const Extension* extension); | 55 void ConfirmUninstall(const Extension* extension); |
| 56 | 56 |
| 57 // This shows the same dialog as above, except it also shows which extension | 57 // This shows the same dialog as above, except it also shows which extension |
| 58 // triggered the dialog by calling chrome.management.uninstall API. | 58 // triggered the dialog by calling chrome.management.uninstall API. |
| 59 void ConfirmProgrammaticUninstall(const Extension* extension, | 59 void ConfirmProgrammaticUninstall(const Extension* extension, |
| 60 const Extension* triggering_extension); | 60 const Extension* triggering_extension); |
| 61 | 61 |
| 62 std::string GetHeadingText(); | 62 std::string GetHeadingText(); |
| 63 | 63 |
| 64 // Returns true if a checkbox for reporting abuse should be shown. |
| 65 bool ShouldShowReportAbuseCheckbox() const; |
| 66 |
| 64 protected: | 67 protected: |
| 65 // Constructor used by the derived classes. | 68 // Constructor used by the derived classes. |
| 66 ExtensionUninstallDialog(Profile* profile, Delegate* delegate); | 69 ExtensionUninstallDialog(Profile* profile, Delegate* delegate); |
| 67 | 70 |
| 71 // Handles the "report abuse" checkbox being checked at the close of the |
| 72 // dialog. |
| 73 void HandleReportAbuse(); |
| 74 |
| 68 // TODO(sashab): Remove protected members: crbug.com/397395 | 75 // TODO(sashab): Remove protected members: crbug.com/397395 |
| 69 Profile* const profile_; | 76 Profile* const profile_; |
| 70 | 77 |
| 71 // The delegate we will call Accepted/Canceled on after confirmation dialog. | 78 // The delegate we will call Accepted/Canceled on after confirmation dialog. |
| 72 Delegate* delegate_; | 79 Delegate* delegate_; |
| 73 | 80 |
| 74 // The extension we are showing the dialog for. | 81 // The extension we are showing the dialog for. |
| 75 const Extension* extension_; | 82 const Extension* extension_; |
| 76 | 83 |
| 77 // The extension triggering the dialog if the dialog was shown by | 84 // The extension triggering the dialog if the dialog was shown by |
| (...skipping 15 matching lines...) Expand all Loading... |
| 93 virtual void Show() = 0; | 100 virtual void Show() = 0; |
| 94 | 101 |
| 95 base::MessageLoop* ui_loop_; | 102 base::MessageLoop* ui_loop_; |
| 96 | 103 |
| 97 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); | 104 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); |
| 98 }; | 105 }; |
| 99 | 106 |
| 100 } // namespace extensions | 107 } // namespace extensions |
| 101 | 108 |
| 102 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ | 109 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| OLD | NEW |