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 |
index 3336a8e3d414911ac5b1acee468ac21b21c61989..18483620369995f7a547cae60e6050bf74455f92 100644 |
--- a/device/generic_sensor/linux/sensor_data_linux.h |
+++ b/device/generic_sensor/linux/sensor_data_linux.h |
@@ -10,6 +10,7 @@ |
namespace device { |
+class PlatformSensorConfiguration; |
struct SensorReading; |
// This structure represents a context that is used to |
@@ -17,8 +18,8 @@ struct SensorReading; |
// sensor that uses the SensorReader to read sensor |
// data from files specified in the |sensor_file_names|. |
struct DEVICE_GENERIC_SENSOR_EXPORT SensorDataLinux { |
- using ReaderFunctor = |
- base::Callback<void(double scaling, SensorReading& reading)>; |
+ using ReaderFunctor = base::Callback< |
+ void(double scaling, double offset, SensorReading& reading)>; |
SensorDataLinux(); |
~SensorDataLinux(); |
@@ -31,16 +32,21 @@ struct DEVICE_GENERIC_SENSOR_EXPORT SensorDataLinux { |
std::vector<std::vector<std::string>> sensor_file_names; |
// Scaling file to be found. |
std::string sensor_scale_name; |
+ // Frequency file to be found. |
+ std::string sensor_frequency_file_name; |
+ // Offset file to be found. |
+ std::string sensor_offset_file_name; |
// Used to apply scalings to raw sensor data. |
ReaderFunctor apply_scaling_func; |
- // Reporting mode of a sensor. |
- mojom::ReportingMode reporting_mode; |
+ // Sensor type |
+ mojom::SensorType type; |
// Default configuration of a sensor. |
PlatformSensorConfiguration default_configuration; |
}; |
// Initializes a sensor type specific data. |
-bool InitSensorData(mojom::SensorType type, SensorDataLinux* data); |
+bool DEVICE_GENERIC_SENSOR_EXPORT InitSensorData(mojom::SensorType type, |
+ SensorDataLinux* data); |
} // namespace device |