| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Uninstalls the extension. | 107 // Uninstalls the extension. |
| 108 virtual bool UninstallExtension(content::BrowserContext* context, | 108 virtual bool UninstallExtension(content::BrowserContext* context, |
| 109 const std::string& transient_extension_id, | 109 const std::string& transient_extension_id, |
| 110 UninstallReason reason, | 110 UninstallReason reason, |
| 111 const base::Closure& deletion_done_callback, | 111 const base::Closure& deletion_done_callback, |
| 112 base::string16* error) const = 0; | 112 base::string16* error) const = 0; |
| 113 | 113 |
| 114 // Creates an app shortcut. | 114 // Creates an app shortcut. |
| 115 virtual bool CreateAppShortcutFunctionDelegate( | 115 virtual bool CreateAppShortcutFunctionDelegate( |
| 116 ManagementCreateAppShortcutFunction* function, | 116 ManagementCreateAppShortcutFunction* function, |
| 117 const Extension* extension) const = 0; | 117 const Extension* extension, |
| 118 std::string* error) const = 0; |
| 118 | 119 |
| 119 // Forwards the call to launch_util::SetLaunchType in chrome. | 120 // Forwards the call to launch_util::SetLaunchType in chrome. |
| 120 virtual void SetLaunchType(content::BrowserContext* context, | 121 virtual void SetLaunchType(content::BrowserContext* context, |
| 121 const std::string& extension_id, | 122 const std::string& extension_id, |
| 122 LaunchType launch_type) const = 0; | 123 LaunchType launch_type) const = 0; |
| 123 | 124 |
| 124 // Creates a bookmark app for |launch_url|. | 125 // Creates a bookmark app for |launch_url|. |
| 125 virtual std::unique_ptr<AppForLinkDelegate> | 126 virtual std::unique_ptr<AppForLinkDelegate> |
| 126 GenerateAppForLinkFunctionDelegate( | 127 GenerateAppForLinkFunctionDelegate( |
| 127 ManagementGenerateAppForLinkFunction* function, | 128 ManagementGenerateAppForLinkFunction* function, |
| 128 content::BrowserContext* context, | 129 content::BrowserContext* context, |
| 129 const std::string& title, | 130 const std::string& title, |
| 130 const GURL& launch_url) const = 0; | 131 const GURL& launch_url) const = 0; |
| 131 | 132 |
| 132 // Forwards the call to ExtensionIconSource::GetIconURL in chrome. | 133 // Forwards the call to ExtensionIconSource::GetIconURL in chrome. |
| 133 virtual GURL GetIconURL(const Extension* extension, | 134 virtual GURL GetIconURL(const Extension* extension, |
| 134 int icon_size, | 135 int icon_size, |
| 135 ExtensionIconSet::MatchType match, | 136 ExtensionIconSet::MatchType match, |
| 136 bool grayscale, | 137 bool grayscale, |
| 137 bool* exists) const = 0; | 138 bool* exists) const = 0; |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 } // namespace extensions | 141 } // namespace extensions |
| 141 | 142 |
| 142 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ | 143 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ |
| OLD | NEW |