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

Unified Diff: content/child/child_thread_impl.cc

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/renderer_host/render_process_host_impl.cc ('k') | content/common/BUILD.gn » ('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 c5cf734aaa1efa9843dcc89dcb3026cbdc067664..2999a12aa8205a11e8304e1eeb7512f5f768010f 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -53,6 +53,7 @@
#include "content/common/child_process_messages.h"
#include "content/common/in_process_child_thread_params.h"
#include "content/common/mojo/mojo_messages.h"
+#include "content/common/mojo/mojo_shell_connection_impl.h"
#include "content/public/common/content_switches.h"
#include "ipc/attachment_broker.h"
#include "ipc/attachment_broker_unprivileged.h"
@@ -68,10 +69,6 @@
#include "ui/ozone/public/client_native_pixmap_factory.h"
#endif
-#if defined(MOJO_SHELL_CLIENT)
-#include "content/common/mojo/mojo_shell_connection_impl.h"
-#endif
-
using tracked_objects::ThreadData;
namespace content {
@@ -682,7 +679,8 @@ void ChildThreadImpl::OnProfilingPhaseCompleted(int profiling_phase) {
void ChildThreadImpl::OnBindExternalMojoShellHandle(
const IPC::PlatformFileForTransit& file) {
-#if defined(MOJO_SHELL_CLIENT)
+ if (!MojoShellConnectionImpl::Get())
+ return;
#if defined(OS_POSIX)
base::PlatformFile handle = file.fd;
#elif defined(OS_WIN)
@@ -691,7 +689,6 @@ void ChildThreadImpl::OnBindExternalMojoShellHandle(
mojo::ScopedMessagePipeHandle pipe =
mojo_shell_channel_init_.Init(handle, GetIOTaskRunner());
MojoShellConnectionImpl::Get()->BindToMessagePipe(std::move(pipe));
-#endif // defined(MOJO_SHELL_CLIENT)
}
void ChildThreadImpl::OnSetMojoParentPipeHandle(
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698