| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 const FilePath& install_directory() const { return install_directory_; } | 95 const FilePath& install_directory() const { return install_directory_; } |
| 96 | 96 |
| 97 // Initialize and start all installed extensions. | 97 // Initialize and start all installed extensions. |
| 98 void Init(); | 98 void Init(); |
| 99 | 99 |
| 100 // Look up an extension by ID. | 100 // Look up an extension by ID. |
| 101 Extension* GetExtensionById(const std::string& id) { | 101 Extension* GetExtensionById(const std::string& id) { |
| 102 return GetExtensionByIdInternal(id, true, false); | 102 return GetExtensionByIdInternal(id, true, false); |
| 103 } | 103 } |
| 104 | 104 |
| 105 // Retrieves a vector of all page actions, irrespective of which extension | |
| 106 // they belong to. | |
| 107 std::vector<ExtensionAction*> GetPageActions() const; | |
| 108 | |
| 109 // Install the extension file at |extension_path|. Will install as an | 105 // Install the extension file at |extension_path|. Will install as an |
| 110 // update if an older version is already installed. | 106 // update if an older version is already installed. |
| 111 // For fresh installs, this method also causes the extension to be | 107 // For fresh installs, this method also causes the extension to be |
| 112 // immediately loaded. | 108 // immediately loaded. |
| 113 // TODO(aa): This method can be removed. It is only used by the unit tests, | 109 // TODO(aa): This method can be removed. It is only used by the unit tests, |
| 114 // and they could use CrxInstaller directly instead. | 110 // and they could use CrxInstaller directly instead. |
| 115 void InstallExtension(const FilePath& extension_path); | 111 void InstallExtension(const FilePath& extension_path); |
| 116 | 112 |
| 117 // Updates a currently-installed extension with the contents from | 113 // Updates a currently-installed extension with the contents from |
| 118 // |extension_path|. | 114 // |extension_path|. |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 371 |
| 376 // A map of all external extension providers. | 372 // A map of all external extension providers. |
| 377 typedef std::map<Extension::Location, | 373 typedef std::map<Extension::Location, |
| 378 linked_ptr<ExternalExtensionProvider> > ProviderMap; | 374 linked_ptr<ExternalExtensionProvider> > ProviderMap; |
| 379 ProviderMap external_extension_providers_; | 375 ProviderMap external_extension_providers_; |
| 380 | 376 |
| 381 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); | 377 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); |
| 382 }; | 378 }; |
| 383 | 379 |
| 384 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 380 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| OLD | NEW |