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 #include "content/shell/renderer/shell_content_renderer_client.h" | 5 #include "content/shell/renderer/shell_content_renderer_client.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "components/web_cache/renderer/web_cache_impl.h" | 13 #include "components/web_cache/renderer/web_cache_impl.h" |
14 #include "content/public/common/service_registry.h" | 14 #include "content/public/common/service_registry.h" |
15 #include "content/public/test/test_mojo_service.mojom.h" | 15 #include "content/public/test/test_mojo_service.mojom.h" |
16 #include "content/shell/common/shell_switches.h" | 16 #include "content/shell/common/shell_switches.h" |
17 #include "content/shell/renderer/shell_render_view_observer.h" | 17 #include "content/shell/renderer/shell_render_view_observer.h" |
18 #include "mojo/public/cpp/bindings/binding.h" | 18 #include "mojo/public/cpp/bindings/binding.h" |
19 #include "mojo/public/cpp/system/message_pipe.h" | 19 #include "mojo/public/cpp/system/message_pipe.h" |
| 20 #include "services/shell/public/cpp/interface_registry.h" |
20 #include "third_party/WebKit/public/web/WebTestingSupport.h" | 21 #include "third_party/WebKit/public/web/WebTestingSupport.h" |
21 #include "third_party/WebKit/public/web/WebView.h" | 22 #include "third_party/WebKit/public/web/WebView.h" |
22 #include "v8/include/v8.h" | 23 #include "v8/include/v8.h" |
23 | 24 |
24 #if defined(ENABLE_PLUGINS) | 25 #if defined(ENABLE_PLUGINS) |
25 #include "ppapi/shared_impl/ppapi_switches.h" | 26 #include "ppapi/shared_impl/ppapi_switches.h" |
26 #endif | 27 #endif |
27 | 28 |
28 namespace content { | 29 namespace content { |
29 | 30 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 117 } |
117 | 118 |
118 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( | 119 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( |
119 v8::Local<v8::Context> context) { | 120 v8::Local<v8::Context> context) { |
120 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 121 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
121 switches::kExposeInternalsForTesting)) { | 122 switches::kExposeInternalsForTesting)) { |
122 blink::WebTestingSupport::injectInternalsObject(context); | 123 blink::WebTestingSupport::injectInternalsObject(context); |
123 } | 124 } |
124 } | 125 } |
125 | 126 |
126 void ShellContentRendererClient::RegisterProcessMojoServices( | 127 void ShellContentRendererClient::RegisterProcessMojoInterfaces( |
127 ServiceRegistry* service_registry) { | 128 shell::InterfaceRegistry* interface_registry) { |
128 service_registry->AddService<mojom::TestMojoService>( | 129 interface_registry->AddInterface<mojom::TestMojoService>( |
129 base::Bind(&CreateTestMojoService)); | 130 base::Bind(&CreateTestMojoService)); |
130 } | 131 } |
131 | 132 |
132 } // namespace content | 133 } // namespace content |
OLD | NEW |