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

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: Created 6 years, 3 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 b9c9d657def14d6cc4b794e7092cd0db6d8df499..0103ce7ebffa6b0f5281ed07a0c7c184b3a394ea 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -433,7 +433,6 @@ RenderProcessHostImpl::RenderProcessHostImpl(
#endif
pending_views_(0),
mojo_application_host_(new MojoApplicationHost),
- mojo_activation_required_(false),
visible_widgets_(0),
backgrounded_(true),
is_initialized_(false),
@@ -638,20 +637,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())
darin (slow to review) 2014/09/15 04:49:32 it turns out this was the only caller of did_activ
- mojo_application_host_->Activate(this, GetHandle());
-}
-
bool RenderProcessHostImpl::ShouldUseMojoChannel() const {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
@@ -1917,7 +1902,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.
@@ -2084,7 +2068,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());
while (!queued_messages_.empty()) {
Send(queued_messages_.front());
@@ -2225,9 +2209,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