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

Unified Diff: content/browser/mojo/mojo_child_connection.cc

Issue 2096643002: Eliminate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mah3
Patch Set: . Created 4 years, 6 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/browser/mojo/mojo_child_connection.h ('k') | content/browser/mojo/mojo_shell_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_child_connection.cc
diff --git a/content/browser/mojo/mojo_child_connection.cc b/content/browser/mojo/mojo_child_connection.cc
index 91690c1af5e5b344d35d28f45656dd9cdd906cda..51042c600c157da2a5337a95546ebd9c28fdbcd2 100644
--- a/content/browser/mojo/mojo_child_connection.cc
+++ b/content/browser/mojo/mojo_child_connection.cc
@@ -24,12 +24,6 @@ MojoChildConnection::MojoChildConnection(const std::string& application_name,
mojo::ScopedMessagePipeHandle shell_client_pipe =
mojo::edk::CreateParentMessagePipe(shell_client_token_, child_token);
- // Some process types get created before the main message loop. In this case
- // the shell request pipe will simply be closed, and the child can detect
- // this.
- if (!MojoShellConnection::GetForProcess())
- return;
-
shell::mojom::ShellClientPtr client;
client.Bind(mojo::InterfacePtrInfo<shell::mojom::ShellClient>(
std::move(shell_client_pipe), 0u));
@@ -42,6 +36,11 @@ MojoChildConnection::MojoChildConnection(const std::string& application_name,
params.set_client_process_connection(std::move(client),
std::move(pid_receiver_request));
connection_ = connector->Connect(&params);
+
+#if defined(OS_ANDROID)
+ service_registry_android_ = ServiceRegistryAndroid::Create(
+ connection_->GetInterfaceRegistry(), connection_->GetRemoteInterfaces());
+#endif
}
MojoChildConnection::~MojoChildConnection() {}
« no previous file with comments | « content/browser/mojo/mojo_child_connection.h ('k') | content/browser/mojo/mojo_shell_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698