| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Returns a list of (module name, resource id) pairs for the JS modules to | 136 // Returns a list of (module name, resource id) pairs for the JS modules to |
| 137 // add to the source map. | 137 // add to the source map. |
| 138 static std::vector<std::pair<const char*, int>> GetJsResources(); | 138 static std::vector<std::pair<const char*, int>> GetJsResources(); |
| 139 static void RegisterNativeHandlers(ModuleSystem* module_system, | 139 static void RegisterNativeHandlers(ModuleSystem* module_system, |
| 140 ScriptContext* context, | 140 ScriptContext* context, |
| 141 Dispatcher* dispatcher, | 141 Dispatcher* dispatcher, |
| 142 ExtensionBindingsSystem* bindings_system, | 142 ExtensionBindingsSystem* bindings_system, |
| 143 V8SchemaRegistry* v8_schema_registry); | 143 V8SchemaRegistry* v8_schema_registry); |
| 144 | 144 |
| 145 ExtensionBindingsSystem* bindings_system() { return bindings_system_.get(); } |
| 146 |
| 145 private: | 147 private: |
| 146 // The RendererPermissionsPolicyDelegateTest.CannotScriptWebstore test needs | 148 // The RendererPermissionsPolicyDelegateTest.CannotScriptWebstore test needs |
| 147 // to call the OnActivateExtension IPCs. | 149 // to call the OnActivateExtension IPCs. |
| 148 friend class ::ChromeRenderViewTest; | 150 friend class ::ChromeRenderViewTest; |
| 149 FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest, | 151 FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest, |
| 150 CannotScriptWebstore); | 152 CannotScriptWebstore); |
| 151 | 153 |
| 152 // RenderThreadObserver implementation: | 154 // RenderThreadObserver implementation: |
| 153 bool OnControlMessageReceived(const IPC::Message& message) override; | 155 bool OnControlMessageReceived(const IPC::Message& message) override; |
| 154 void IdleNotification() override; | 156 void IdleNotification() override; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 // if this renderer is a WebView guest render process. Otherwise, this will be | 294 // if this renderer is a WebView guest render process. Otherwise, this will be |
| 293 // empty. | 295 // empty. |
| 294 std::string webview_partition_id_; | 296 std::string webview_partition_id_; |
| 295 | 297 |
| 296 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 298 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 297 }; | 299 }; |
| 298 | 300 |
| 299 } // namespace extensions | 301 } // namespace extensions |
| 300 | 302 |
| 301 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 303 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |