| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ | 5 #ifndef DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ |
| 6 #define DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ | 6 #define DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ |
| 7 | 7 |
| 8 #include "device/generic_sensor/platform_sensor_provider.h" | 8 #include "device/generic_sensor/platform_sensor_provider.h" |
| 9 | 9 |
| 10 #include "device/generic_sensor/generic_sensor_export.h" | 10 #include "device/generic_sensor/generic_sensor_export.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 using SensorDeviceMap = | 52 using SensorDeviceMap = |
| 53 std::unordered_map<mojom::SensorType, std::unique_ptr<SensorInfoLinux>>; | 53 std::unordered_map<mojom::SensorType, std::unique_ptr<SensorInfoLinux>>; |
| 54 | 54 |
| 55 PlatformSensorProviderLinux(); | 55 PlatformSensorProviderLinux(); |
| 56 | 56 |
| 57 void SensorDeviceFound( | 57 void SensorDeviceFound( |
| 58 mojom::SensorType type, | 58 mojom::SensorType type, |
| 59 mojo::ScopedSharedBufferMapping mapping, | 59 mojo::ScopedSharedBufferMapping mapping, |
| 60 const PlatformSensorProviderBase::CreateSensorCallback& callback, | 60 const PlatformSensorProviderBase::CreateSensorCallback& callback, |
| 61 SensorInfoLinux* sensor_device); | 61 const SensorInfoLinux* sensor_device); |
| 62 | 62 |
| 63 bool StartPollingThread(); | 63 bool StartPollingThread(); |
| 64 | 64 |
| 65 // Stops a polling thread if there are no sensors left. Must be called on | 65 // Stops a polling thread if there are no sensors left. Must be called on |
| 66 // a different than the polling thread which allows I/O. | 66 // a different than the polling thread which allows I/O. |
| 67 void StopPollingThread(); | 67 void StopPollingThread(); |
| 68 | 68 |
| 69 // Shuts down a service that tracks events from iio subsystem. | 69 // Shuts down a service that tracks events from iio subsystem. |
| 70 void Shutdown(); | 70 void Shutdown(); |
| 71 | 71 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // provider to stop a polling thread and passed to a manager that | 112 // provider to stop a polling thread and passed to a manager that |
| 113 // runs a linux device monitor service on this task runner. | 113 // runs a linux device monitor service on this task runner. |
| 114 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | 114 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderLinux); | 116 DISALLOW_COPY_AND_ASSIGN(PlatformSensorProviderLinux); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace device | 119 } // namespace device |
| 120 | 120 |
| 121 #endif // DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ | 121 #endif // DEVICE_GENERIC_SENSOR_PUBLIC_PLATFORM_SENSOR_PROVIDER_LINUX_H_ |
| OLD | NEW |