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

Side by Side Diff: device/generic_sensor/platform_sensor_utils_iio.h

Issue 2370343002: [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)
Patch Set: changed implementation Created 4 years, 2 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 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_PLATFORM_SENSOR_UTILS_IIO_H_
6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_
7
8 #include "base/files/file_path.h"
9 #include "device/generic_sensor/public/interfaces/sensor.mojom.h"
10
11 namespace device {
12
13 class SensorReader {
Mikhail 2016/10/11 14:46:47 how is that different to ambient_light_reader_iio.
14 public:
15 static std::unique_ptr<SensorReader> Create(mojom::SensorType type);
16
17 bool ReadSensorValue(double* lux);
18
19 mojom::SensorType type() const;
20
21 private:
22 SensorReader(mojom::SensorType type,
23 std::vector<base::FilePath> sensor_paths);
Mikhail 2016/10/11 14:46:47 pass vector as const ref
24
25 const mojom::SensorType type_;
26 const std::vector<base::FilePath> sensor_paths_;
27
28 DISALLOW_COPY_AND_ASSIGN(SensorReader);
29 };
30
31 } // device
32
33 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_UTILS_IIO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698