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 |