| 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 e45d992d7c6cb7e39d5a49db94235dc714993f36..3336a8e3d414911ac5b1acee468ac21b21c61989 100644
|
| --- a/device/generic_sensor/linux/sensor_data_linux.h
|
| +++ b/device/generic_sensor/linux/sensor_data_linux.h
|
| @@ -10,11 +10,16 @@
|
|
|
| namespace device {
|
|
|
| +struct SensorReading;
|
| +
|
| // 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 {
|
| + using ReaderFunctor =
|
| + base::Callback<void(double scaling, SensorReading& reading)>;
|
| +
|
| SensorDataLinux();
|
| ~SensorDataLinux();
|
| SensorDataLinux(const SensorDataLinux& other);
|
| @@ -24,6 +29,10 @@ struct DEVICE_GENERIC_SENSOR_EXPORT SensorDataLinux {
|
| // 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;
|
| + // Scaling file to be found.
|
| + std::string sensor_scale_name;
|
| + // Used to apply scalings to raw sensor data.
|
| + ReaderFunctor apply_scaling_func;
|
| // Reporting mode of a sensor.
|
| mojom::ReportingMode reporting_mode;
|
| // Default configuration of a sensor.
|
|
|