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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // if the result is not a DictionaryValue. | 89 // if the result is not a DictionaryValue. |
90 base::DictionaryValue* ParseManifest( | 90 base::DictionaryValue* ParseManifest( |
91 const std::string& manifest_contents) const; | 91 const std::string& manifest_contents) const; |
92 | 92 |
93 // Clear the list of registered extensions. | 93 // Clear the list of registered extensions. |
94 void ClearAllRegistered(); | 94 void ClearAllRegistered(); |
95 | 95 |
96 // Reloads a registered component extension. | 96 // Reloads a registered component extension. |
97 void Reload(const std::string& extension_id); | 97 void Reload(const std::string& extension_id); |
98 | 98 |
| 99 #if defined(OS_CHROMEOS) |
| 100 std::string AddChromeVoxExtension(); |
| 101 std::string AddChromeOsSpeechSynthesisExtension(); |
| 102 #endif |
| 103 |
99 private: | 104 private: |
100 // Information about a registered component extension. | 105 // Information about a registered component extension. |
101 struct ComponentExtensionInfo { | 106 struct ComponentExtensionInfo { |
102 ComponentExtensionInfo(const base::DictionaryValue* manifest, | 107 ComponentExtensionInfo(const base::DictionaryValue* manifest, |
103 const base::FilePath& root_directory); | 108 const base::FilePath& root_directory); |
104 | 109 |
105 // The parsed contents of the extensions's manifest file. | 110 // The parsed contents of the extensions's manifest file. |
106 const base::DictionaryValue* manifest; | 111 const base::DictionaryValue* manifest; |
107 | 112 |
108 // Directory where the extension is stored. | 113 // Directory where the extension is stored. |
(...skipping 21 matching lines...) Expand all Loading... |
130 void AddWithName(int manifest_resource_id, | 135 void AddWithName(int manifest_resource_id, |
131 const base::FilePath& root_directory, | 136 const base::FilePath& root_directory, |
132 const std::string& name); | 137 const std::string& name); |
133 void AddChromeApp(); | 138 void AddChromeApp(); |
134 void AddKeyboardApp(); | 139 void AddKeyboardApp(); |
135 void AddWebStoreApp(); | 140 void AddWebStoreApp(); |
136 | 141 |
137 // Unloads |component| from the memory. | 142 // Unloads |component| from the memory. |
138 void UnloadComponent(ComponentExtensionInfo* component); | 143 void UnloadComponent(ComponentExtensionInfo* component); |
139 | 144 |
| 145 // Enable HTML5 FileSystem for given component extension in Guest mode. |
| 146 void EnableFileSystemInGuestMode(const std::string& id); |
| 147 |
140 PrefService* profile_prefs_; | 148 PrefService* profile_prefs_; |
141 PrefService* local_state_; | 149 PrefService* local_state_; |
142 content::BrowserContext* browser_context_; | 150 content::BrowserContext* browser_context_; |
143 | 151 |
144 ExtensionServiceInterface* extension_service_; | 152 ExtensionServiceInterface* extension_service_; |
145 | 153 |
146 // List of registered component extensions (see Manifest::Location). | 154 // List of registered component extensions (see Manifest::Location). |
147 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; | 155 typedef std::vector<ComponentExtensionInfo> RegisteredComponentExtensions; |
148 RegisteredComponentExtensions component_extensions_; | 156 RegisteredComponentExtensions component_extensions_; |
149 | 157 |
150 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NetworkSpeechEngine); | 158 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NetworkSpeechEngine); |
151 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NoNetworkSpeechEngineWhenOffline); | 159 FRIEND_TEST_ALL_PREFIXES(TtsApiTest, NoNetworkSpeechEngineWhenOffline); |
152 | 160 |
153 DISALLOW_COPY_AND_ASSIGN(ComponentLoader); | 161 DISALLOW_COPY_AND_ASSIGN(ComponentLoader); |
154 }; | 162 }; |
155 | 163 |
156 } // namespace extensions | 164 } // namespace extensions |
157 | 165 |
158 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ | 166 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_LOADER_H_ |
OLD | NEW |