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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 // Sets up the host permissions for |extension|. | 204 // Sets up the host permissions for |extension|. |
205 void InitOriginPermissions(const Extension* extension); | 205 void InitOriginPermissions(const Extension* extension); |
206 void AddOrRemoveOriginPermissions( | 206 void AddOrRemoveOriginPermissions( |
207 UpdatedExtensionPermissionsInfo::Reason reason, | 207 UpdatedExtensionPermissionsInfo::Reason reason, |
208 const Extension* extension, | 208 const Extension* extension, |
209 const URLPatternSet& origins); | 209 const URLPatternSet& origins); |
210 | 210 |
211 void RegisterNativeHandlers(ModuleSystem* module_system, | 211 void RegisterNativeHandlers(ModuleSystem* module_system, |
212 ChromeV8Context* context); | 212 ChromeV8Context* context); |
213 void RegisterSchemaGeneratedBindings(ModuleSystem* module_system, | 213 void AddOrRemoveBindings(ChromeV8Context* context); |
214 ChromeV8Context* context); | 214 void RegisterBinding(const std::string& api_name, |
| 215 ChromeV8Context* context); |
| 216 void DeregisterBinding(const std::string& api_name, ChromeV8Context* context); |
| 217 v8::Handle<v8::Object> GetOrCreateBindObjectIfAvailable( |
| 218 const std::string& api_name, |
| 219 std::string* bind_name, |
| 220 ChromeV8Context* context); |
215 | 221 |
216 // Inserts static source code into |source_map_|. | 222 // Inserts static source code into |source_map_|. |
217 void PopulateSourceMap(); | 223 void PopulateSourceMap(); |
218 | 224 |
219 // Inserts BindingInstallers into |lazy_bindings_map_|. | 225 // Inserts BindingInstallers into |lazy_bindings_map_|. |
220 void PopulateLazyBindingsMap(); | 226 void PopulateLazyBindingsMap(); |
221 | 227 |
222 // Sets up the bindings for the given api. | 228 // Sets up the bindings for the given api. |
223 void InstallBindings(ModuleSystem* module_system, | 229 void InstallBindings(ModuleSystem* module_system, |
224 v8::Handle<v8::Context> v8_context, | 230 v8::Handle<v8::Context> v8_context, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 295 |
290 // Sends API requests to the extension host. | 296 // Sends API requests to the extension host. |
291 scoped_ptr<RequestSender> request_sender_; | 297 scoped_ptr<RequestSender> request_sender_; |
292 | 298 |
293 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 299 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
294 }; | 300 }; |
295 | 301 |
296 } // namespace extensions | 302 } // namespace extensions |
297 | 303 |
298 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 304 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
OLD | NEW |