| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // Accessors for members. | 89 // Accessors for members. |
| 90 const Profile* profile() const { return profile_; } | 90 const Profile* profile() const { return profile_; } |
| 91 Delegate* delegate() const { return delegate_; } | 91 Delegate* delegate() const { return delegate_; } |
| 92 const Extension* extension() const { return extension_.get(); } | 92 const Extension* extension() const { return extension_.get(); } |
| 93 const Extension* triggering_extension() const { | 93 const Extension* triggering_extension() const { |
| 94 return triggering_extension_.get(); } | 94 return triggering_extension_.get(); } |
| 95 const gfx::ImageSkia& icon() const { return icon_; } | 95 const gfx::ImageSkia& icon() const { return icon_; } |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 // Uninstalls the extension. Returns true on success, and populates |error| on |
| 99 // failure. |
| 100 bool Uninstall(base::string16* error); |
| 101 |
| 98 // Handles the "report abuse" checkbox being checked at the close of the | 102 // Handles the "report abuse" checkbox being checked at the close of the |
| 99 // dialog. | 103 // dialog. |
| 100 void HandleReportAbuse(); | 104 void HandleReportAbuse(); |
| 101 | 105 |
| 102 // Sets the icon that will be used in the dialog. If |icon| contains an empty | 106 // Sets the icon that will be used in the dialog. If |icon| contains an empty |
| 103 // image, then we use a default icon instead. | 107 // image, then we use a default icon instead. |
| 104 void SetIcon(const gfx::Image& image); | 108 void SetIcon(const gfx::Image& image); |
| 105 | 109 |
| 106 void OnImageLoaded(const std::string& extension_id, const gfx::Image& image); | 110 void OnImageLoaded(const std::string& extension_id, const gfx::Image& image); |
| 107 | 111 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 127 UninstallReason uninstall_reason_; | 131 UninstallReason uninstall_reason_; |
| 128 | 132 |
| 129 base::ThreadChecker thread_checker_; | 133 base::ThreadChecker thread_checker_; |
| 130 | 134 |
| 131 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); | 135 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); |
| 132 }; | 136 }; |
| 133 | 137 |
| 134 } // namespace extensions | 138 } // namespace extensions |
| 135 | 139 |
| 136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ | 140 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
| OLD | NEW |