| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ |
| 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ | 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "extensions/browser/uninstall_reason.h" | 9 #include "extensions/browser/uninstall_reason.h" |
| 10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Enables the extension identified by |extension_id|. | 83 // Enables the extension identified by |extension_id|. |
| 84 virtual void EnableExtension(content::BrowserContext* context, | 84 virtual void EnableExtension(content::BrowserContext* context, |
| 85 const std::string& extension_id) const = 0; | 85 const std::string& extension_id) const = 0; |
| 86 | 86 |
| 87 // Disables the extension identified by |extension_id|. | 87 // Disables the extension identified by |extension_id|. |
| 88 virtual void DisableExtension( | 88 virtual void DisableExtension( |
| 89 content::BrowserContext* context, | 89 content::BrowserContext* context, |
| 90 const std::string& extension_id, | 90 const std::string& extension_id, |
| 91 Extension::DisableReason disable_reason) const = 0; | 91 Extension::DisableReason disable_reason) const = 0; |
| 92 | 92 |
| 93 // Used to show a confirmation dialog when uninstalling |target_extension_id|. | 93 // Used to show a confirmation dialog when uninstalling |target_extension|. |
| 94 virtual scoped_ptr<UninstallDialogDelegate> UninstallFunctionDelegate( | 94 virtual scoped_ptr<UninstallDialogDelegate> UninstallFunctionDelegate( |
| 95 ManagementUninstallFunctionBase* function, | 95 ManagementUninstallFunctionBase* function, |
| 96 const std::string& target_extension_id) const = 0; | 96 const Extension* target_extension, |
| 97 bool show_programmatic_uninstall_ui) const = 0; |
| 97 | 98 |
| 98 // Uninstalls the extension. | 99 // Uninstalls the extension. |
| 99 virtual bool UninstallExtension(content::BrowserContext* context, | 100 virtual bool UninstallExtension(content::BrowserContext* context, |
| 100 const std::string& transient_extension_id, | 101 const std::string& transient_extension_id, |
| 101 UninstallReason reason, | 102 UninstallReason reason, |
| 102 const base::Closure& deletion_done_callback, | 103 const base::Closure& deletion_done_callback, |
| 103 base::string16* error) const = 0; | 104 base::string16* error) const = 0; |
| 104 | 105 |
| 105 // Creates an app shortcut. | 106 // Creates an app shortcut. |
| 106 virtual bool CreateAppShortcutFunctionDelegate( | 107 virtual bool CreateAppShortcutFunctionDelegate( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 123 virtual GURL GetIconURL(const Extension* extension, | 124 virtual GURL GetIconURL(const Extension* extension, |
| 124 int icon_size, | 125 int icon_size, |
| 125 ExtensionIconSet::MatchType match, | 126 ExtensionIconSet::MatchType match, |
| 126 bool grayscale, | 127 bool grayscale, |
| 127 bool* exists) const = 0; | 128 bool* exists) const = 0; |
| 128 }; | 129 }; |
| 129 | 130 |
| 130 } // namespace extensions | 131 } // namespace extensions |
| 131 | 132 |
| 132 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ | 133 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ |
| OLD | NEW |