| OLD | NEW | 
|---|
|  | (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_LINUX_SENSOR_DATA_LINUX_H_ |  | 
| 6 #define DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DATA_LINUX_H_ |  | 
| 7 |  | 
| 8 #include "device/generic_sensor/generic_sensor_export.h" |  | 
| 9 #include "device/generic_sensor/public/interfaces/sensor.mojom.h" |  | 
| 10 |  | 
| 11 namespace device { |  | 
| 12 |  | 
| 13 // This structure represents a context that is used to |  | 
| 14 // create a type specific SensorReader and a concrete |  | 
| 15 // sensor that uses the SensorReader to read sensor |  | 
| 16 // data from files specified in the |sensor_file_names|. |  | 
| 17 struct DEVICE_GENERIC_SENSOR_EXPORT SensorDataLinux { |  | 
| 18   SensorDataLinux(); |  | 
| 19   ~SensorDataLinux(); |  | 
| 20   SensorDataLinux(const SensorDataLinux& other); |  | 
| 21   // Provides a base path to all sensors. |  | 
| 22   const base::FilePath::CharType* base_path_sensor_linux; |  | 
| 23   // Provides an array of sensor file names to be searched for. |  | 
| 24   // Different sensors might have up to 3 different file name arrays. |  | 
| 25   // One file must be found from each array. |  | 
| 26   std::vector<std::vector<std::string>> sensor_file_names; |  | 
| 27   // Reporting mode of a sensor. |  | 
| 28   mojom::ReportingMode reporting_mode; |  | 
| 29   // Default configuration of a sensor. |  | 
| 30   PlatformSensorConfiguration default_configuration; |  | 
| 31 }; |  | 
| 32 |  | 
| 33 // Initializes a sensor type specific data. |  | 
| 34 bool InitSensorData(mojom::SensorType type, SensorDataLinux* data); |  | 
| 35 |  | 
| 36 }  // namespace device |  | 
| 37 |  | 
| 38 #endif  // DEVICE_GENERIC_SENSOR_LINUX_SENSOR_DATA_LINUX_H_ |  | 
| OLD | NEW | 
|---|