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_RENDERER_EXTENSIONS_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // Update the list of active extensions that will be reported when we crash. | 187 // Update the list of active extensions that will be reported when we crash. |
188 void UpdateActiveExtensions(); | 188 void UpdateActiveExtensions(); |
189 | 189 |
190 // Sets up the host permissions for |extension|. | 190 // Sets up the host permissions for |extension|. |
191 void InitOriginPermissions(const Extension* extension); | 191 void InitOriginPermissions(const Extension* extension); |
192 void AddOrRemoveOriginPermissions( | 192 void AddOrRemoveOriginPermissions( |
193 UpdatedExtensionPermissionsInfo::Reason reason, | 193 UpdatedExtensionPermissionsInfo::Reason reason, |
194 const Extension* extension, | 194 const Extension* extension, |
195 const URLPatternSet& origins); | 195 const URLPatternSet& origins); |
196 | 196 |
| 197 void RefreshSchemaGeneratedBindings(); |
| 198 |
197 void RegisterNativeHandlers(ModuleSystem* module_system, | 199 void RegisterNativeHandlers(ModuleSystem* module_system, |
198 ChromeV8Context* context); | 200 ChromeV8Context* context); |
199 void RegisterSchemaGeneratedBindings(ModuleSystem* module_system, | 201 void RegisterSchemaGeneratedBindings(ModuleSystem* module_system, |
200 ChromeV8Context* context); | 202 ChromeV8Context* context); |
| 203 void RegisterBinding(const std::string& api_name, |
| 204 ModuleSystem* module_system, |
| 205 ChromeV8Context* context); |
| 206 void RemoveAPIBindingIfPresent(const std::string& api_name, |
| 207 ChromeV8Context* context); |
| 208 v8::Handle<v8::Object> GetBindObject(const std::string& api_name, |
| 209 std::string* bind_name, |
| 210 ChromeV8Context* context); |
201 | 211 |
202 // Inserts static source code into |source_map_|. | 212 // Inserts static source code into |source_map_|. |
203 void PopulateSourceMap(); | 213 void PopulateSourceMap(); |
204 | 214 |
205 // Inserts BindingInstallers into |lazy_bindings_map_|. | 215 // Inserts BindingInstallers into |lazy_bindings_map_|. |
206 void PopulateLazyBindingsMap(); | 216 void PopulateLazyBindingsMap(); |
207 | 217 |
208 // Sets up the bindings for the given api. | 218 // Sets up the bindings for the given api. |
209 void InstallBindings(ModuleSystem* module_system, | 219 void InstallBindings(ModuleSystem* module_system, |
210 v8::Handle<v8::Context> v8_context, | 220 v8::Handle<v8::Context> v8_context, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 285 |
276 // Sends API requests to the extension host. | 286 // Sends API requests to the extension host. |
277 scoped_ptr<RequestSender> request_sender_; | 287 scoped_ptr<RequestSender> request_sender_; |
278 | 288 |
279 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 289 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
280 }; | 290 }; |
281 | 291 |
282 } // namespace extensions | 292 } // namespace extensions |
283 | 293 |
284 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 294 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
OLD | NEW |