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

Unified Diff: device/generic_sensor/ambient_light_reader_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 side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/ambient_light_reader_iio.h
diff --git a/device/generic_sensor/ambient_light_reader_iio.h b/device/generic_sensor/ambient_light_reader_iio.h
new file mode 100644
index 0000000000000000000000000000000000000000..783e0b075cc6eecb70b019342c6e6eb1a15336ee
--- /dev/null
+++ b/device/generic_sensor/ambient_light_reader_iio.h
@@ -0,0 +1,30 @@
+// 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_AMBIENT_LIGHT_READER_IIO_H_
+#define DEVICE_GENERIC_SENSOR_AMBIENT_LIGHT_READER_IIO_H_
+
+#include "base/files/file_path.h"
+
+namespace device {
+
+// Provides an interface to retrieve ambient light data from
+// an ambient light sensor.
+class AmbientLightSensorReaderIio {
+ public:
+ AmbientLightSensorReaderIio();
+ ~AmbientLightSensorReaderIio();
+
+ bool ReadSensorLuxValue(double* lux);
Mikhail 2016/10/11 14:46:46 methods description is missing
maksims (do not use this acc) 2016/10/11 15:00:57 This class is old. I've forgotten to remove this.
maksims (do not use this acc) 2016/10/14 12:31:45 Done.
+ bool DetectLightSensor();
+
+ private:
+ base::FilePath sensor_path_;
+
+ DISALLOW_COPY_AND_ASSIGN(AmbientLightSensorReaderIio);
+};
+
+} // namespace content
+
+#endif // DEVICE_GENERIC_SENSOR_AMBIENT_LIGHT_READER_IIO_H_

Powered by Google App Engine
This is Rietveld 408576698