Index: device/device_sensors/device_sensors_motion_impl.h |
diff --git a/device/device_sensors/device_sensors_motion_impl.h b/device/device_sensors/device_sensors_motion_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..27fac4f4935344841e16d4f9bd246a62debdd913 |
--- /dev/null |
+++ b/device/device_sensors/device_sensors_motion_impl.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef DEVICE_DEVICE_SENSORS_DEVICE_SENSORS_MOTION_IMPL_H_ |
+#define DEVICE_DEVICE_SENSORS_DEVICE_SENSORS_MOTION_IMPL_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/macros.h" |
+#include "base/single_thread_task_runner.h" |
+#include "device/device_sensors/device_sensors.mojom.h" |
+#include "device/device_sensors/device_sensors_export.h" |
+#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
+ |
+namespace device { |
+ |
+class DeviceSensorsMotionImpl : public DeviceSensorsMotion { |
+ public: |
+ DEVICE_SENSORS_EXPORT static void Create( |
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
+ mojo::InterfaceRequest<DeviceSensorsMotion> request); |
+ |
+ private: |
+ explicit DeviceSensorsMotionImpl( |
+ mojo::InterfaceRequest<DeviceSensorsMotion> request); |
+ ~DeviceSensorsMotionImpl() override; |
+ |
+ static void CreateOnTaskRunnerThread( |
+ mojo::InterfaceRequest<DeviceSensorsMotion> request); |
+ |
+ // DeviceSensorsMotion methods: |
+ void StartPolling(int32 peer_process_id, |
+ const StartPollingCallback& callback) override; |
+ |
+ mojo::StrongBinding<DeviceSensorsMotion> binding_; |
+ bool is_started_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DeviceSensorsMotionImpl); |
+}; |
+ |
+} // namespace device |
+ |
+#endif // DEVICE_DEVICE_SENSORS_DEVICE_SENSORS_MOTION_IMPL_H_ |