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

Unified Diff: device/generic_sensor/platform_sensor_linux.h

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase 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
« no previous file with comments | « device/generic_sensor/platform_sensor_android.cc ('k') | device/generic_sensor/platform_sensor_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/generic_sensor/platform_sensor_linux.h
diff --git a/device/generic_sensor/platform_sensor_linux.h b/device/generic_sensor/platform_sensor_linux.h
deleted file mode 100644
index 9442b0c0b61319c6a3582f54f33752ae8d3625f3..0000000000000000000000000000000000000000
--- a/device/generic_sensor/platform_sensor_linux.h
+++ /dev/null
@@ -1,66 +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_GENERIC_SENSOR_PLATFORM_SENSOR_LINUX_H_
-#define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_LINUX_H_
-
-#include "device/generic_sensor/platform_sensor.h"
-
-namespace base {
-class SingleThreadTaskRunner;
-}
-
-namespace device {
-
-class SensorReader;
-struct SensorInfoLinux;
-
-class PlatformSensorLinux : public PlatformSensor {
- public:
- PlatformSensorLinux(
- mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
- PlatformSensorProvider* provider,
- const SensorInfoLinux* sensor_device,
- scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner);
-
- mojom::ReportingMode GetReportingMode() override;
-
- // Called by a sensor reader. Takes new readings.
- void UpdatePlatformSensorReading(SensorReading reading);
-
- // Called by a sensor reader if an error occurs.
- void NotifyPlatformSensorError();
-
- protected:
- ~PlatformSensorLinux() override;
- bool StartSensor(const PlatformSensorConfiguration& configuration) override;
- void StopSensor() override;
- bool CheckSensorConfiguration(
- const PlatformSensorConfiguration& configuration) override;
- PlatformSensorConfiguration GetDefaultConfiguration() override;
-
- private:
- const PlatformSensorConfiguration default_configuration_;
- const mojom::ReportingMode reporting_mode_;
-
- scoped_refptr<base::SingleThreadTaskRunner> polling_thread_task_runner_;
-
- // A sensor reader that reads values from sensor files
- // and stores them to a SensorReading structure.
- std::unique_ptr<SensorReader> sensor_reader_;
-
- // Stores previously read values that are used to
- // determine whether the recent values are changed
- // and IPC can be notified that updates are available.
- SensorReading old_values_;
-
- base::WeakPtrFactory<PlatformSensorLinux> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PlatformSensorLinux);
-};
-
-} // namespace device
-
-#endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_LINUX_H_
« no previous file with comments | « device/generic_sensor/platform_sensor_android.cc ('k') | device/generic_sensor/platform_sensor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698