| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMPONENT_LOADER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 static void RegisterUserPrefs(PrefService* prefs); | 72 static void RegisterUserPrefs(PrefService* prefs); |
| 73 | 73 |
| 74 // Parse the given JSON manifest. Returns NULL if it cannot be parsed, or if | 74 // Parse the given JSON manifest. Returns NULL if it cannot be parsed, or if |
| 75 // if the result is not a DictionaryValue. | 75 // if the result is not a DictionaryValue. |
| 76 DictionaryValue* ParseManifest(const std::string& manifest_contents) const; | 76 DictionaryValue* ParseManifest(const std::string& manifest_contents) const; |
| 77 | 77 |
| 78 // Clear the list of registered extensions. | 78 // Clear the list of registered extensions. |
| 79 void ClearAllRegistered(); | 79 void ClearAllRegistered(); |
| 80 | 80 |
| 81 // Reloads a registered component extension. |
| 82 void Reload(const std::string& extension_id); |
| 83 |
| 81 private: | 84 private: |
| 82 // Information about a registered component extension. | 85 // Information about a registered component extension. |
| 83 struct ComponentExtensionInfo { | 86 struct ComponentExtensionInfo { |
| 84 ComponentExtensionInfo(const DictionaryValue* manifest, | 87 ComponentExtensionInfo(const DictionaryValue* manifest, |
| 85 const FilePath& root_directory) | 88 const FilePath& root_directory) |
| 86 : manifest(manifest), | 89 : manifest(manifest), |
| 87 root_directory(root_directory) { | 90 root_directory(root_directory) { |
| 88 } | 91 } |
| 89 | 92 |
| 90 // The parsed contents of the extensions's manifest file. | 93 // The parsed contents of the extensions's manifest file. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 119 // List of registered component extensions (see Extension::Location). | 122 // List of registered component extensions (see Extension::Location). |
| 120 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; | 123 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; |
| 121 RegisteredComponentExtensions component_extensions_; | 124 RegisteredComponentExtensions component_extensions_; |
| 122 | 125 |
| 123 PrefChangeRegistrar pref_change_registrar_; | 126 PrefChangeRegistrar pref_change_registrar_; |
| 124 }; | 127 }; |
| 125 | 128 |
| 126 } // namespace extensions | 129 } // namespace extensions |
| 127 | 130 |
| 128 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ | 131 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
| OLD | NEW |