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

Unified Diff: content/browser/renderer_host/render_process_host_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.h ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e393673e44ba62ce6ddd97c410b8ba3aa24cb858..b62a5b508bc7b46d0e2cea0214dab6167beafb6b 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -80,6 +80,7 @@
#include "content/browser/message_port_message_filter.h"
#include "content/browser/mime_registry_message_filter.h"
#include "content/browser/mojo/mojo_application_host.h"
+#include "content/browser/mojo/mojo_shell_client_host.h"
#include "content/browser/navigator_connect/service_port_service_impl.h"
#include "content/browser/notifications/notification_message_filter.h"
#include "content/browser/permissions/permission_service_context.h"
@@ -124,6 +125,7 @@
#include "content/common/in_process_child_thread_params.h"
#include "content/common/mojo/channel_init.h"
#include "content/common/mojo/mojo_messages.h"
+#include "content/common/mojo/mojo_shell_connection_impl.h"
#include "content/common/render_process_messages.h"
#include "content/common/resource_messages.h"
#include "content/common/site_isolation_policy.h"
@@ -230,11 +232,6 @@
#include "content/common/media/media_stream_messages.h"
#endif
-#if defined(MOJO_SHELL_CLIENT)
-#include "content/browser/mojo/mojo_shell_client_host.h"
-#include "content/common/mojo/mojo_shell_connection_impl.h"
-#endif
-
#if defined(OS_WIN)
#define IntToStringType base::IntToString16
#else
@@ -626,10 +623,6 @@ RenderProcessHostImpl::RenderProcessHostImpl(
IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded();
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
#endif // USE_ATTACHMENT_BROKER
-
-#if defined(MOJO_SHELL_CLIENT)
- RegisterChildWithExternalShell(id_, this);
-#endif
}
// static
@@ -708,6 +701,8 @@ bool RenderProcessHostImpl::Init() {
if (channel_)
return true;
+ RegisterChildWithExternalShell(id_, instance_id_++, this);
+
base::CommandLine::StringType renderer_prefix;
// A command prefix is something prepended to the command line of the spawned
// process.
@@ -1631,11 +1626,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
renderer_cmd->AppendSwitch(switches::kWaitForDebugger);
}
}
-
-#if defined(MOJO_SHELL_CLIENT)
- if (IsRunningInMojoShell())
- renderer_cmd->AppendSwitch(switches::kEnableMojoShellConnection);
-#endif
}
base::ProcessHandle RenderProcessHostImpl::GetHandle() const {
@@ -2588,10 +2578,8 @@ void RenderProcessHostImpl::OnProcessLaunched() {
process_handle, true)));
}
-#if defined(MOJO_SHELL_CLIENT)
// Send the mojo shell handle to the renderer.
SendExternalMojoShellHandleToChild(GetHandle(), this);
-#endif
// Allow Mojo to be setup before the renderer sees any Chrome IPC messages.
// This way, Mojo can be safely used from the renderer in response to any
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698