| 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" | |
| 15 #include "content/public/test/test_mojo_service.mojom.h" | 14 #include "content/public/test/test_mojo_service.mojom.h" |
| 16 #include "content/shell/common/shell_switches.h" | 15 #include "content/shell/common/shell_switches.h" |
| 17 #include "content/shell/renderer/shell_render_view_observer.h" | 16 #include "content/shell/renderer/shell_render_view_observer.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 17 #include "mojo/public/cpp/bindings/binding.h" |
| 19 #include "mojo/public/cpp/system/message_pipe.h" | 18 #include "mojo/public/cpp/system/message_pipe.h" |
| 20 #include "services/shell/public/cpp/interface_registry.h" | 19 #include "services/shell/public/cpp/interface_registry.h" |
| 21 #include "third_party/WebKit/public/web/WebTestingSupport.h" | 20 #include "third_party/WebKit/public/web/WebTestingSupport.h" |
| 22 #include "third_party/WebKit/public/web/WebView.h" | 21 #include "third_party/WebKit/public/web/WebView.h" |
| 23 #include "v8/include/v8.h" | 22 #include "v8/include/v8.h" |
| 24 | 23 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 116 } |
| 118 | 117 |
| 119 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( | 118 void ShellContentRendererClient::DidInitializeWorkerContextOnWorkerThread( |
| 120 v8::Local<v8::Context> context) { | 119 v8::Local<v8::Context> context) { |
| 121 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 120 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 122 switches::kExposeInternalsForTesting)) { | 121 switches::kExposeInternalsForTesting)) { |
| 123 blink::WebTestingSupport::injectInternalsObject(context); | 122 blink::WebTestingSupport::injectInternalsObject(context); |
| 124 } | 123 } |
| 125 } | 124 } |
| 126 | 125 |
| 127 void ShellContentRendererClient::RegisterProcessMojoInterfaces( | 126 void ShellContentRendererClient::ExposeInterfacesToBrowser( |
| 128 shell::InterfaceRegistry* interface_registry) { | 127 shell::InterfaceRegistry* interface_registry) { |
| 129 interface_registry->AddInterface<mojom::TestMojoService>( | 128 interface_registry->AddInterface<mojom::TestMojoService>( |
| 130 base::Bind(&CreateTestMojoService)); | 129 base::Bind(&CreateTestMojoService)); |
| 131 } | 130 } |
| 132 | 131 |
| 133 } // namespace content | 132 } // namespace content |
| OLD | NEW |