| 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 ba63945eeb29b13d2d8344f7be2a404fe2520c91..7718166d3eeb2969e275280d21496abbe35d4680 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -1263,11 +1263,23 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
| file_task_runner);
|
| #endif
|
|
|
| - // These callbacks will be run immediately on the IO thread.
|
| +#if defined(OS_ANDROID)
|
| + // On Android the device sensors implementations need to run on the UI thread
|
| + // to communicate to Java.
|
| + AddUIThreadInterface(registry.get(), base::Bind(&DeviceLightHost::Create));
|
| + AddUIThreadInterface(registry.get(), base::Bind(&DeviceMotionHost::Create));
|
| + AddUIThreadInterface(registry.get(),
|
| + base::Bind(&DeviceOrientationHost::Create));
|
| + AddUIThreadInterface(registry.get(),
|
| + base::Bind(&DeviceOrientationAbsoluteHost::Create));
|
| +#else
|
| + // On platforms other than Android the device sensors implementations run on
|
| + // the IO thread.
|
| registry->AddInterface(base::Bind(&DeviceLightHost::Create));
|
| registry->AddInterface(base::Bind(&DeviceMotionHost::Create));
|
| registry->AddInterface(base::Bind(&DeviceOrientationHost::Create));
|
| registry->AddInterface(base::Bind(&DeviceOrientationAbsoluteHost::Create));
|
| +#endif // defined(OS_ANDROID)
|
|
|
| registry->AddInterface(
|
| base::Bind(&VideoCaptureHost::Create,
|
|
|