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 #include "device/generic_sensor/platform_sensor_reader_linux.h" | 5 #include "device/generic_sensor/platform_sensor_reader_linux.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/single_thread_task_runner.h" |
9 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
11 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
12 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
13 #include "device/generic_sensor/linux/sensor_data_linux.h" | 14 #include "device/generic_sensor/linux/sensor_data_linux.h" |
14 #include "device/generic_sensor/platform_sensor_linux.h" | 15 #include "device/generic_sensor/platform_sensor_linux.h" |
15 #include "device/generic_sensor/public/cpp/sensor_reading.h" | 16 #include "device/generic_sensor/public/cpp/sensor_reading.h" |
16 | 17 |
17 namespace device { | 18 namespace device { |
18 | 19 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void SensorReader::NotifyReadError() { | 154 void SensorReader::NotifyReadError() { |
154 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); | 155 DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); |
155 if (is_reading_active_) { | 156 if (is_reading_active_) { |
156 task_runner_->PostTask( | 157 task_runner_->PostTask( |
157 FROM_HERE, | 158 FROM_HERE, |
158 base::Bind(&PlatformSensorLinux::NotifyPlatformSensorError, sensor_)); | 159 base::Bind(&PlatformSensorLinux::NotifyPlatformSensorError, sensor_)); |
159 } | 160 } |
160 } | 161 } |
161 | 162 |
162 } // namespace device | 163 } // namespace device |
OLD | NEW |