Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index c4b72a3241682e420e1aee06434c9c44cbaf6003..de830f42ef43f732fe58fdda9d5c94fe7df35ba9 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -169,8 +169,6 @@ |
#include "mojo/edk/embedder/embedder.h" |
#include "net/url_request/url_request_context_getter.h" |
#include "ppapi/shared_impl/ppapi_switches.h" |
-#include "services/shell/public/cpp/interface_provider.h" |
-#include "services/shell/public/cpp/interface_registry.h" |
#include "services/shell/runner/common/switches.h" |
#include "storage/browser/fileapi/sandbox_file_system_backend.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
@@ -602,8 +600,6 @@ |
#endif // defined(OS_MACOSX) |
#endif // USE_ATTACHMENT_BROKER |
- scoped_refptr<base::SequencedTaskRunner> io_task_runner = |
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); |
shell::Connector* connector = |
BrowserContext::GetShellConnectorFor(browser_context_); |
// Some embedders may not initialize Mojo or the shell connector for a browser |
@@ -616,14 +612,15 @@ |
if (!MojoShellConnection::GetForProcess()) { |
shell::mojom::ServiceRequest request = mojo::GetProxy(&test_service_); |
MojoShellConnection::SetForProcess(MojoShellConnection::Create( |
- std::move(request), io_task_runner)); |
+ std::move(request))); |
} |
connector = MojoShellConnection::GetForProcess()->GetConnector(); |
} |
mojo_child_connection_.reset(new MojoChildConnection( |
kRendererMojoApplicationName, |
- base::StringPrintf("%d_%d", id_, instance_id_++), child_token_, connector, |
- io_task_runner)); |
+ base::StringPrintf("%d_%d", id_, instance_id_++), |
+ child_token_, |
+ connector)); |
} |
// static |
@@ -763,7 +760,8 @@ |
in_process_renderer_.reset( |
g_renderer_main_thread_factory(InProcessChildThreadParams( |
channel_id, |
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
+ BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) |
+ ->task_runner(), |
mojo_channel_token_, |
mojo_child_connection_->service_token()))); |
@@ -1123,11 +1121,16 @@ |
} |
shell::InterfaceRegistry* RenderProcessHostImpl::GetInterfaceRegistry() { |
- return mojo_child_connection_->GetInterfaceRegistry(); |
+ return GetChildConnection()->GetInterfaceRegistry(); |
} |
shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() { |
- return mojo_child_connection_->GetRemoteInterfaces(); |
+ return GetChildConnection()->GetRemoteInterfaces(); |
+} |
+ |
+shell::Connection* RenderProcessHostImpl::GetChildConnection() { |
+ DCHECK(mojo_child_connection_); |
+ return mojo_child_connection_->connection(); |
} |
std::unique_ptr<base::SharedPersistentMemoryAllocator> |
@@ -2431,8 +2434,9 @@ |
connector = MojoShellConnection::GetForProcess()->GetConnector(); |
mojo_child_connection_.reset(new MojoChildConnection( |
kRendererMojoApplicationName, |
- base::StringPrintf("%d_%d", id_, instance_id_++), child_token_, connector, |
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); |
+ base::StringPrintf("%d_%d", id_, instance_id_++), |
+ child_token_, |
+ connector)); |
within_process_died_observer_ = true; |
NotificationService::current()->Notify( |