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_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_ |
6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const std::string& manifest_str) const = 0; | 76 const std::string& manifest_str) const = 0; |
77 | 77 |
78 // Used to show a dialog prompt in chrome when management.setEnabled extension | 78 // Used to show a dialog prompt in chrome when management.setEnabled extension |
79 // function is called. | 79 // function is called. |
80 virtual std::unique_ptr<InstallPromptDelegate> SetEnabledFunctionDelegate( | 80 virtual std::unique_ptr<InstallPromptDelegate> SetEnabledFunctionDelegate( |
81 content::WebContents* web_contents, | 81 content::WebContents* web_contents, |
82 content::BrowserContext* browser_context, | 82 content::BrowserContext* browser_context, |
83 const Extension* extension, | 83 const Extension* extension, |
84 const base::Callback<void(bool)>& callback) const = 0; | 84 const base::Callback<void(bool)>& callback) const = 0; |
85 | 85 |
86 // Returns a new RequirementsChecker. | |
87 virtual std::unique_ptr<RequirementsChecker> CreateRequirementsChecker() | |
88 const = 0; | |
89 | |
90 // Enables the extension identified by |extension_id|. | 86 // Enables the extension identified by |extension_id|. |
91 virtual void EnableExtension(content::BrowserContext* context, | 87 virtual void EnableExtension(content::BrowserContext* context, |
92 const std::string& extension_id) const = 0; | 88 const std::string& extension_id) const = 0; |
93 | 89 |
94 // Disables the extension identified by |extension_id|. | 90 // Disables the extension identified by |extension_id|. |
95 virtual void DisableExtension( | 91 virtual void DisableExtension( |
96 content::BrowserContext* context, | 92 content::BrowserContext* context, |
97 const std::string& extension_id, | 93 const std::string& extension_id, |
98 Extension::DisableReason disable_reason) const = 0; | 94 Extension::DisableReason disable_reason) const = 0; |
99 | 95 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Forwards the call to ExtensionIconSource::GetIconURL in chrome. | 128 // Forwards the call to ExtensionIconSource::GetIconURL in chrome. |
133 virtual GURL GetIconURL(const Extension* extension, | 129 virtual GURL GetIconURL(const Extension* extension, |
134 int icon_size, | 130 int icon_size, |
135 ExtensionIconSet::MatchType match, | 131 ExtensionIconSet::MatchType match, |
136 bool grayscale) const = 0; | 132 bool grayscale) const = 0; |
137 }; | 133 }; |
138 | 134 |
139 } // namespace extensions | 135 } // namespace extensions |
140 | 136 |
141 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_ | 137 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_ |
OLD | NEW |