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 7d405ca58cb46abef69b9a28586799e3a33bba5e..3aa4ef2763aba6f45a78bbb899086f0edc906be1 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -105,7 +105,6 @@ |
#include "content/browser/storage_partition_impl.h" |
#include "content/browser/streams/stream_context.h" |
#include "content/browser/tracing/trace_message_filter.h" |
-#include "content/browser/vibration/vibration_message_filter.h" |
#include "content/browser/webui/web_ui_controller_factory_registry.h" |
#include "content/common/child_process_host_impl.h" |
#include "content/common/child_process_messages.h" |
@@ -133,6 +132,7 @@ |
#include "content/public/common/result_codes.h" |
#include "content/public/common/sandboxed_process_launcher_delegate.h" |
#include "content/public/common/url_constants.h" |
+#include "device/vibration/vibration_manager_impl.h" |
#include "gpu/command_buffer/client/gpu_switches.h" |
#include "gpu/command_buffer/service/gpu_switches.h" |
#include "ipc/ipc_channel.h" |
@@ -589,6 +589,7 @@ bool RenderProcessHostImpl::Init() { |
GetContentClient()->browser()->RenderProcessWillLaunch(this); |
CreateMessageFilters(); |
+ RegisterMojoServices(); |
if (run_renderer_in_process()) { |
DCHECK(g_renderer_main_thread_factory); |
@@ -886,7 +887,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
switches::kEnableMemoryBenchmarking)) |
AddFilter(new MemoryBenchmarkMessageFilter()); |
#endif |
- AddFilter(new VibrationMessageFilter()); |
AddFilter(new PushMessagingMessageFilter( |
GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
AddFilter(new BatteryStatusMessageFilter()); |
@@ -2107,7 +2107,8 @@ 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(); |
+ // NOTE: Apparently this leads to flaky crashes see crbug.com/415059. |
+ mojo_application_host_->Activate(this, GetHandle()); |
if (channel_mojo_host_) |
channel_mojo_host_->OnClientLaunched(GetHandle()); |
@@ -2256,4 +2257,9 @@ void RenderProcessHostImpl::EnsureMojoActivated() { |
MaybeActivateMojo(); |
} |
+void RenderProcessHostImpl::RegisterMojoServices() { |
+ mojo_application_host_->service_registry() |
+ ->AddService(base::Bind(&device::VibrationManagerImpl::Create)); |
+} |
+ |
} // namespace content |