| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_RENDERER_DISPATCHER_H_ | 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_ |
| 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ | 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 // Enable custom element whitelist in Apps. | 220 // Enable custom element whitelist in Apps. |
| 221 void EnableCustomElementWhiteList(); | 221 void EnableCustomElementWhiteList(); |
| 222 | 222 |
| 223 // Adds or removes bindings for every context belonging to |extension_id|, or | 223 // Adds or removes bindings for every context belonging to |extension_id|, or |
| 224 // or all contexts if |extension_id| is empty. | 224 // or all contexts if |extension_id| is empty. |
| 225 void UpdateBindings(const std::string& extension_id); | 225 void UpdateBindings(const std::string& extension_id); |
| 226 | 226 |
| 227 void UpdateBindingsForContext(ScriptContext* context); | 227 void UpdateBindingsForContext(ScriptContext* context); |
| 228 | 228 |
| 229 void RegisterBinding(const std::string& api_name, ScriptContext* context); | 229 void RegisterBinding(const std::string& api_name, |
| 230 const std::string& api_bind_name, |
| 231 ScriptContext* context); |
| 230 | 232 |
| 231 void RegisterNativeHandlers(ModuleSystem* module_system, | 233 void RegisterNativeHandlers(ModuleSystem* module_system, |
| 232 ScriptContext* context, | 234 ScriptContext* context, |
| 233 RequestSender* request_sender, | 235 RequestSender* request_sender, |
| 234 V8SchemaRegistry* v8_schema_registry); | 236 V8SchemaRegistry* v8_schema_registry); |
| 235 | 237 |
| 236 // Determines if a ScriptContext can connect to any externally_connectable- | 238 // Determines if a ScriptContext can connect to any externally_connectable- |
| 237 // enabled extension. | 239 // enabled extension. |
| 238 bool IsRuntimeAvailableToContext(ScriptContext* context); | 240 bool IsRuntimeAvailableToContext(ScriptContext* context); |
| 239 | 241 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // if this renderer is a WebView guest render process. Otherwise, this will be | 317 // if this renderer is a WebView guest render process. Otherwise, this will be |
| 316 // empty. | 318 // empty. |
| 317 std::string webview_partition_id_; | 319 std::string webview_partition_id_; |
| 318 | 320 |
| 319 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 321 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 320 }; | 322 }; |
| 321 | 323 |
| 322 } // namespace extensions | 324 } // namespace extensions |
| 323 | 325 |
| 324 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 326 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |