Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Unified Diff: content/child/child_thread_impl.cc

Issue 2157143002: Move interface registration to OnConnect in RPH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 8be6e48be0b89dbfa3733852a1c5732cc673b5b4..f97209f0a3d1785e34dd426ee25f8175e3a451a6 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -68,6 +68,7 @@
#include "mojo/edk/embedder/named_platform_channel_pair.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
#include "mojo/edk/embedder/scoped_ipc_support.h"
+#include "services/shell/public/cpp/connector.h"
#include "services/shell/public/cpp/interface_provider.h"
#include "services/shell/public/cpp/interface_registry.h"
#include "services/shell/runner/common/client_util.h"
@@ -431,13 +432,15 @@ void ChildThreadImpl::Init(const Options& options) {
mojo_shell_connection_ = MojoShellConnection::Create(
mojo::MakeRequest<shell::mojom::Service>(std::move(handle)),
GetIOTaskRunner());
+ browser_connection_ =
+ mojo_shell_connection_->GetConnector()->Connect("exe:content_browser");
// TODO(rockot): Remove this once all child-to-browser interface connections
// are made via a Connector rather than directly through an
// InterfaceProvider, and all exposed interfaces are exposed via a
// ConnectionFilter.
mojo_shell_connection_->SetupInterfaceRequestProxies(
- GetInterfaceRegistry(), GetRemoteInterfaces());
+ GetInterfaceRegistry(), nullptr);
if (options.auto_start_mojo_shell_connection)
StartMojoShellConnection();
@@ -626,9 +629,7 @@ shell::InterfaceRegistry* ChildThreadImpl::GetInterfaceRegistry() {
}
shell::InterfaceProvider* ChildThreadImpl::GetRemoteInterfaces() {
- if (!remote_interfaces_.get())
- remote_interfaces_.reset(new shell::InterfaceProvider);
- return remote_interfaces_.get();
+ return browser_connection_->GetRemoteInterfaces();
}
IPC::MessageRouter* ChildThreadImpl::GetRouter() {
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698