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

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

Issue 2410123002: Remove content::BrowserThread knowledge from Device Sensors (Closed)
Patch Set: Rebase, avoid object creation on startup Created 4 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/device_sensors/sensor_manager_android_unittest.cc ('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 088b7196b9c210ff5c5e93333b1da9907e15ca4c..1bc2ee53d952dd5e85fed19b0b6b33bb72f5051c 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1280,10 +1280,14 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
#endif
// These callbacks will be run immediately 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));
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner =
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::UI);
+ registry->AddInterface(base::Bind(&DeviceLightHost::Create, ui_task_runner));
+ registry->AddInterface(base::Bind(&DeviceMotionHost::Create, ui_task_runner));
+ registry->AddInterface(
+ base::Bind(&DeviceOrientationHost::Create, ui_task_runner));
+ registry->AddInterface(
+ base::Bind(&DeviceOrientationAbsoluteHost::Create, ui_task_runner));
registry->AddInterface(
base::Bind(&URLLoaderFactoryImpl::Create, resource_message_filter_));
« no previous file with comments | « content/browser/device_sensors/sensor_manager_android_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698