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

Side by Side Diff: device/generic_sensor/linux/platform_sensor_utils_linux.h

Issue 2468283003: Revert of [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_GENERIC_SENSOR_LINUX_PLATFORM_SENSOR_UTILS_LINUX_H_
6 #define DEVICE_GENERIC_SENSOR_LINUX_PLATFORM_SENSOR_UTILS_LINUX_H_
7
8 #include "base/files/file_path.h"
9 #include "base/memory/ptr_util.h"
10 #include "device/generic_sensor/generic_sensor_export.h"
11
12 namespace device {
13
14 struct SensorDataLinux;
15 struct SensorReading;
16
17 // Generic reader class that reads sensors data from
18 // sensors files located in the base iio folder.
19 class DEVICE_GENERIC_SENSOR_EXPORT SensorReader {
20 public:
21 ~SensorReader();
22
23 // Creates a new instance of SensorReader if sensor read files
24 // has been found and |sensor_paths_| are set.
25 static std::unique_ptr<SensorReader> Create(const SensorDataLinux& data);
26
27 // Reads sensor values into |*reading| from sensor files
28 // specified in |sensor_paths_|.
29 bool ReadSensorReading(SensorReading* reading);
30
31 private:
32 explicit SensorReader(std::vector<base::FilePath> sensor_paths);
33
34 // Contains paths to sensor files that are set when
35 // Create() is called.
36 const std::vector<base::FilePath> sensor_paths_;
37
38 DISALLOW_COPY_AND_ASSIGN(SensorReader);
39 };
40
41 } // namespace device
42
43 #endif // DEVICE_GENERIC_SENSOR_LINUX_PLATFORM_SENSOR_UTILS_LINUX_H_
OLDNEW
« no previous file with comments | « device/generic_sensor/BUILD.gn ('k') | device/generic_sensor/linux/platform_sensor_utils_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698