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