| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // The parsed contents of the extensions's manifest file. | 105 // The parsed contents of the extensions's manifest file. |
| 106 const base::DictionaryValue* manifest; | 106 const base::DictionaryValue* manifest; |
| 107 | 107 |
| 108 // Directory where the extension is stored. | 108 // Directory where the extension is stored. |
| 109 base::FilePath root_directory; | 109 base::FilePath root_directory; |
| 110 | 110 |
| 111 // The component extension's ID. | 111 // The component extension's ID. |
| 112 std::string extension_id; | 112 std::string extension_id; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 std::string Add(const base::DictionaryValue* parsed_manifest, | 115 std::string Add(base::DictionaryValue* parsed_manifest, |
| 116 const base::FilePath& root_directory); | 116 const base::FilePath& root_directory); |
| 117 | 117 |
| 118 // Loads a registered component extension. | 118 // Loads a registered component extension. |
| 119 void Load(const ComponentExtensionInfo& info); | 119 void Load(const ComponentExtensionInfo& info); |
| 120 | 120 |
| 121 void AddDefaultComponentExtensionsWithBackgroundPages( | 121 void AddDefaultComponentExtensionsWithBackgroundPages( |
| 122 bool skip_session_components); | 122 bool skip_session_components); |
| 123 void AddFileManagerExtension(); | 123 void AddFileManagerExtension(); |
| 124 void AddHangoutServicesExtension(); | 124 void AddHangoutServicesExtension(); |
| 125 void AddImageLoaderExtension(); | 125 void AddImageLoaderExtension(); |
| 126 void AddBookmarksExtensions(); | 126 void AddBookmarksExtensions(); |
| 127 void AddNetworkSpeechSynthesisExtension(); | 127 void AddNetworkSpeechSynthesisExtension(); |
| 128 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
| 129 void AddChromeOsSpeechSynthesisExtension(); | 129 void AddChromeOsSpeechSynthesisExtension(); |
| 130 #endif | 130 #endif |
| 131 | 131 |
| 132 void AddWithName(int manifest_resource_id, | 132 void AddWithName(int manifest_resource_id, |
| 133 const base::FilePath& root_directory, | 133 const base::FilePath& root_directory, |
| 134 const std::string& name); | 134 const std::string& name); |
| 135 void AddChromeApp(); | 135 void AddChromeApp(); |
| 136 void AddKeyboardApp(); | 136 void AddKeyboardApp(); |
| 137 void AddWebStoreApp(); | 137 void AddWebStoreApp(); |
| 138 | 138 |
| 139 // Unloads |component| from the memory. | 139 // Unloads |component| from the memory. |
| 140 void UnloadComponent(ComponentExtensionInfo* component); | 140 void UnloadComponent(ComponentExtensionInfo* component); |
| 141 | 141 |
| 142 // Enable HTML5 FileSystem for given component extension in Guest mode. |
| 143 void EnbaleFileSystemInGuestMode(const std::string& id); |
| 144 |
| 142 PrefService* profile_prefs_; | 145 PrefService* profile_prefs_; |
| 143 PrefService* local_state_; | 146 PrefService* local_state_; |
| 144 content::BrowserContext* browser_context_; | 147 content::BrowserContext* browser_context_; |
| 145 | 148 |
| 146 ExtensionServiceInterface* extension_service_; | 149 ExtensionServiceInterface* extension_service_; |
| 147 | 150 |
| 148 // List of registered component extensions (see Manifest::Location). | 151 // List of registered component extensions (see Manifest::Location). |
| 149 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; | 152 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; |
| 150 RegisteredComponentExtensions component_extensions_; | 153 RegisteredComponentExtensions component_extensions_; |
| 151 | 154 |
| 152 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NetworkSpeechEngine); | 155 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NetworkSpeechEngine); |
| 153 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NoNetworkSpeechEngineWhenOffline); | 156 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NoNetworkSpeechEngineWhenOffline); |
| 154 | 157 |
| 155 DISALLOW_COPY_AND_ASSIGN(ComponentLoader); | 158 DISALLOW_COPY_AND_ASSIGN(ComponentLoader); |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 } // namespace extensions | 161 } // namespace extensions |
| 159 | 162 |
| 160 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ | 163 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
| OLD | NEW |