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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 563373002: Always activate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-landing Created 6 years, 2 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') | no next file » | 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 cbfa1504dcc45c3da2c9ca022ee9573df0cdd2de..ff641c63aac45aec393e7ade7f3523a96f8bbadd 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -440,7 +440,6 @@ RenderProcessHostImpl::RenderProcessHostImpl(
#endif
pending_views_(0),
mojo_application_host_(new MojoApplicationHost),
- mojo_activation_required_(false),
visible_widgets_(0),
backgrounded_(true),
is_initialized_(false),
@@ -646,20 +645,6 @@ bool RenderProcessHostImpl::Init() {
return true;
}
-void RenderProcessHostImpl::MaybeActivateMojo() {
- // TODO(darin): Following security review, we can unconditionally initialize
- // Mojo in all renderers. We will then be able to directly call Activate()
- // from OnProcessLaunched.
- if (!mojo_activation_required_)
- return; // Waiting on someone to require Mojo.
-
- if (!GetHandle())
- return; // Waiting on renderer startup.
-
- if (!mojo_application_host_->did_activate())
- mojo_application_host_->Activate(this, GetHandle());
-}
-
bool RenderProcessHostImpl::ShouldUseMojoChannel() const {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
@@ -1943,7 +1928,6 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) {
}
mojo_application_host_.reset(new MojoApplicationHost);
- mojo_activation_required_ = false;
// It's possible that one of the calls out to the observers might have caused
// this object to be no longer needed.
@@ -2110,7 +2094,7 @@ void RenderProcessHostImpl::OnProcessLaunched() {
// 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
// Chrome IPC message.
- MaybeActivateMojo();
+ mojo_application_host_->Activate(this, GetHandle());
if (channel_mojo_host_)
channel_mojo_host_->OnClientLaunched(GetHandle());
@@ -2254,9 +2238,4 @@ void RenderProcessHostImpl::DecrementWorkerRefCount() {
Cleanup();
}
-void RenderProcessHostImpl::EnsureMojoActivated() {
- mojo_activation_required_ = true;
- MaybeActivateMojo();
-}
-
} // namespace content
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698