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

Unified Diff: device/sensors/device_sensor_host.h

Issue 2885203004: Refactor content/renderer/device_sensors to use device/generic_sensor instead of device/sensors (Closed)
Patch Set: updated content/renderer/BUILD.gn Created 3 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/sensors/device_sensor_host.h
diff --git a/device/sensors/device_sensor_host.h b/device/sensors/device_sensor_host.h
deleted file mode 100644
index b6aad4edc95fa22002bec6af4bb568df35cadbc1..0000000000000000000000000000000000000000
--- a/device/sensors/device_sensor_host.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 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_SENSORS_DEVICE_SENSOR_HOST_H_
-#define DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_
-
-#include "base/macros.h"
-#include "base/memory/shared_memory.h"
-#include "device/sensors/device_sensors_consts.h"
-#include "device/sensors/public/interfaces/motion.mojom.h"
-#include "device/sensors/public/interfaces/orientation.mojom.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
-
-namespace device {
-
-// A base class for device sensor related mojo interface implementations.
-template <typename MojoInterface, ConsumerType consumer_type>
-class DeviceSensorHost : NON_EXPORTED_BASE(public MojoInterface) {
- public:
- static void Create(mojo::InterfaceRequest<MojoInterface> request);
-
- // All methods below to be called on the IO thread.
- ~DeviceSensorHost() override;
-
- private:
- DeviceSensorHost();
-
- void StartPolling(
- typename MojoInterface::StartPollingCallback callback) override;
- void StopPolling() override;
-
- bool is_started_;
-
- base::ThreadChecker thread_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceSensorHost);
-};
-
-using DeviceMotionHost =
- DeviceSensorHost<device::mojom::MotionSensor, CONSUMER_TYPE_MOTION>;
-using DeviceOrientationHost = DeviceSensorHost<device::mojom::OrientationSensor,
- CONSUMER_TYPE_ORIENTATION>;
-using DeviceOrientationAbsoluteHost =
- DeviceSensorHost<device::mojom::OrientationAbsoluteSensor,
- CONSUMER_TYPE_ORIENTATION_ABSOLUTE>;
-
-} // namespace device
-
-#endif // DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698