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

Unified Diff: device/generic_sensor/linux/sensor_data_linux.h

Issue 2480773002: Reland of [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)
Patch Set: remove parenthesis 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 side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/linux/sensor_data_linux.h
diff --git a/device/generic_sensor/linux/sensor_data_linux.h b/device/generic_sensor/linux/sensor_data_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..e45d992d7c6cb7e39d5a49db94235dc714993f36
--- /dev/null
+++ b/device/generic_sensor/linux/sensor_data_linux.h
@@ -0,0 +1,38 @@
+// 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_LINUX_SENSOR_DATA_LINUX_H_
+#define DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DATA_LINUX_H_
+
+#include "device/generic_sensor/generic_sensor_export.h"
+#include "device/generic_sensor/public/interfaces/sensor.mojom.h"
+
+namespace device {
+
+// This structure represents a context that is used to
+// create a type specific SensorReader and a concrete
+// sensor that uses the SensorReader to read sensor
+// data from files specified in the |sensor_file_names|.
+struct DEVICE_GENERIC_SENSOR_EXPORT SensorDataLinux {
+ SensorDataLinux();
+ ~SensorDataLinux();
+ SensorDataLinux(const SensorDataLinux& other);
+ // Provides a base path to all sensors.
+ const base::FilePath::CharType* base_path_sensor_linux;
+ // Provides an array of sensor file names to be searched for.
+ // Different sensors might have up to 3 different file name arrays.
+ // One file must be found from each array.
+ std::vector<std::vector<std::string>> sensor_file_names;
+ // Reporting mode of a sensor.
+ mojom::ReportingMode reporting_mode;
+ // Default configuration of a sensor.
+ PlatformSensorConfiguration default_configuration;
+};
+
+// Initializes a sensor type specific data.
+bool InitSensorData(mojom::SensorType type, SensorDataLinux* data);
+
+} // namespace device
+
+#endif // DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DATA_LINUX_H_
« no previous file with comments | « device/generic_sensor/linux/platform_sensor_utils_linux.cc ('k') | device/generic_sensor/linux/sensor_data_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698