| 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" |
| 11 #include "extensions/common/extension.h" | 11 #include "extensions/common/extension.h" |
| 12 #include "extensions/common/extension_icon_set.h" | 12 #include "extensions/common/extension_icon_set.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class BrowserContext; | 16 class BrowserContext; |
| 17 class WebContents; |
| 17 } // namespace content | 18 } // namespace content |
| 18 | 19 |
| 19 namespace extensions { | 20 namespace extensions { |
| 20 | 21 |
| 21 class Extension; | 22 class Extension; |
| 22 class ExtensionPrefs; | 23 class ExtensionPrefs; |
| 23 class ManagementCreateAppShortcutFunction; | 24 class ManagementCreateAppShortcutFunction; |
| 24 class ManagementGenerateAppForLinkFunction; | 25 class ManagementGenerateAppForLinkFunction; |
| 25 class ManagementGetPermissionWarningsByManifestFunction; | 26 class ManagementGetPermissionWarningsByManifestFunction; |
| 26 class ManagementSetEnabledFunction; | 27 class ManagementSetEnabledFunction; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 72 |
| 72 // Parses the manifest and calls back the | 73 // Parses the manifest and calls back the |
| 73 // ManagementGetPermissionWarningsByManifestFunction. | 74 // ManagementGetPermissionWarningsByManifestFunction. |
| 74 virtual void GetPermissionWarningsByManifestFunctionDelegate( | 75 virtual void GetPermissionWarningsByManifestFunctionDelegate( |
| 75 ManagementGetPermissionWarningsByManifestFunction* function, | 76 ManagementGetPermissionWarningsByManifestFunction* function, |
| 76 const std::string& manifest_str) const = 0; | 77 const std::string& manifest_str) const = 0; |
| 77 | 78 |
| 78 // Used to show a dialog prompt in chrome when management.setEnabled extension | 79 // Used to show a dialog prompt in chrome when management.setEnabled extension |
| 79 // function is called. | 80 // function is called. |
| 80 virtual scoped_ptr<InstallPromptDelegate> SetEnabledFunctionDelegate( | 81 virtual scoped_ptr<InstallPromptDelegate> SetEnabledFunctionDelegate( |
| 81 ManagementSetEnabledFunction* function, | 82 content::WebContents* web_contents, |
| 82 const Extension* extension) const = 0; | 83 content::BrowserContext* browser_context, |
| 84 const Extension* extension, |
| 85 const base::Callback<void(bool)>& callback) const = 0; |
| 83 | 86 |
| 84 // Returns a new RequirementsChecker. | 87 // Returns a new RequirementsChecker. |
| 85 virtual scoped_ptr<RequirementsChecker> CreateRequirementsChecker() const = 0; | 88 virtual scoped_ptr<RequirementsChecker> CreateRequirementsChecker() const = 0; |
| 86 | 89 |
| 87 // Enables the extension identified by |extension_id|. | 90 // Enables the extension identified by |extension_id|. |
| 88 virtual void EnableExtension(content::BrowserContext* context, | 91 virtual void EnableExtension(content::BrowserContext* context, |
| 89 const std::string& extension_id) const = 0; | 92 const std::string& extension_id) const = 0; |
| 90 | 93 |
| 91 // Disables the extension identified by |extension_id|. | 94 // Disables the extension identified by |extension_id|. |
| 92 virtual void DisableExtension( | 95 virtual void DisableExtension( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 virtual GURL GetIconURL(const Extension* extension, | 131 virtual GURL GetIconURL(const Extension* extension, |
| 129 int icon_size, | 132 int icon_size, |
| 130 ExtensionIconSet::MatchType match, | 133 ExtensionIconSet::MatchType match, |
| 131 bool grayscale, | 134 bool grayscale, |
| 132 bool* exists) const = 0; | 135 bool* exists) const = 0; |
| 133 }; | 136 }; |
| 134 | 137 |
| 135 } // namespace extensions | 138 } // namespace extensions |
| 136 | 139 |
| 137 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ | 140 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATER_H_ |
| OLD | NEW |