| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSIONS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 void ClearProvidersForTesting(); | 256 void ClearProvidersForTesting(); |
| 257 | 257 |
| 258 // Sets an ExternalExtensionProvider for the service to use during testing. | 258 // Sets an ExternalExtensionProvider for the service to use during testing. |
| 259 // |location| specifies what type of provider should be added. | 259 // |location| specifies what type of provider should be added. |
| 260 void SetProviderForTesting(Extension::Location location, | 260 void SetProviderForTesting(Extension::Location location, |
| 261 ExternalExtensionProvider* test_provider); | 261 ExternalExtensionProvider* test_provider); |
| 262 | 262 |
| 263 // Called when the initial extensions load has completed. | 263 // Called when the initial extensions load has completed. |
| 264 virtual void OnLoadedInstalledExtensions(); | 264 virtual void OnLoadedInstalledExtensions(); |
| 265 | 265 |
| 266 // Called when an extension has been loaded. | 266 // Called when an extension has been loaded. Returns false if the extension |
| 267 void OnExtensionLoaded(Extension* extension, | 267 // failed to load (for example, if it has already been loaded). |
| 268 bool OnExtensionLoaded(Extension* extension, |
| 268 bool allow_privilege_increase); | 269 bool allow_privilege_increase); |
| 269 | 270 |
| 270 // Called by the backend when an extension has been installed. | 271 // Called by the backend when an extension has been installed. |
| 271 void OnExtensionInstalled(Extension* extension, | 272 void OnExtensionInstalled(Extension* extension, |
| 272 bool allow_privilege_increase); | 273 bool allow_privilege_increase); |
| 273 | 274 |
| 274 // Called by the backend when an external extension is found. | 275 // Called by the backend when an external extension is found. |
| 275 void OnExternalExtensionFound(const std::string& id, | 276 void OnExternalExtensionFound(const std::string& id, |
| 276 const std::string& version, | 277 const std::string& version, |
| 277 const FilePath& path, | 278 const FilePath& path, |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 | 519 |
| 519 // A map of all external extension providers. | 520 // A map of all external extension providers. |
| 520 typedef std::map<Extension::Location, | 521 typedef std::map<Extension::Location, |
| 521 linked_ptr<ExternalExtensionProvider> > ProviderMap; | 522 linked_ptr<ExternalExtensionProvider> > ProviderMap; |
| 522 ProviderMap external_extension_providers_; | 523 ProviderMap external_extension_providers_; |
| 523 | 524 |
| 524 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); | 525 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); |
| 525 }; | 526 }; |
| 526 | 527 |
| 527 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 528 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| OLD | NEW |