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

Unified Diff: device/device_sensors/device_sensors_motion_impl.h

Issue 1164563003: Extract device_sensors to /device via Mojofication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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_
« no previous file with comments | « device/device_sensors/device_sensors_light_impl.cc ('k') | device/device_sensors/device_sensors_motion_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698