Index: content/browser/device_sensors/device_sensor_host.h |
diff --git a/content/browser/device_sensors/device_sensor_host.h b/content/browser/device_sensors/device_sensor_host.h |
index e7fceb3f255bea1e9327f9010c816f5d0d9259a0..37cf1f698cf42c5afe009d97bbe21e86f469ba93 100644 |
--- a/content/browser/device_sensors/device_sensor_host.h |
+++ b/content/browser/device_sensors/device_sensor_host.h |
@@ -7,6 +7,7 @@ |
#include "base/macros.h" |
#include "base/memory/shared_memory.h" |
+#include "base/sequenced_task_runner.h" |
#include "content/browser/device_sensors/device_sensors_consts.h" |
#include "device/sensors/public/interfaces/light.mojom.h" |
#include "device/sensors/public/interfaces/motion.mojom.h" |
@@ -19,13 +20,15 @@ namespace content { |
template <typename MojoInterface, ConsumerType consumer_type> |
class DeviceSensorHost : public MojoInterface { |
public: |
- static void Create(mojo::InterfaceRequest<MojoInterface> request); |
+ static void Create(scoped_refptr<base::SequencedTaskRunner> ui_task_runner, |
+ mojo::InterfaceRequest<MojoInterface> request); |
// All methods below to be called on the IO thread. |
~DeviceSensorHost() override; |
private: |
- DeviceSensorHost(); |
+ explicit DeviceSensorHost( |
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner); |
void StartPolling( |
const typename MojoInterface::StartPollingCallback& callback) override; |
@@ -33,6 +36,7 @@ class DeviceSensorHost : public MojoInterface { |
bool is_started_; |
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
base::ThreadChecker thread_checker_; |
DISALLOW_COPY_AND_ASSIGN(DeviceSensorHost); |