| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromeos/accelerometer/accelerometer_reader.h" | 5 #include "chromeos/accelerometer/accelerometer_reader.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "base/task_runner.h" | 14 #include "base/task_runner.h" |
| 15 #include "base/task_runner_util.h" | 15 #include "base/task_runner_util.h" |
| 16 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // Trigger another read after the current sampling delay. | 213 // Trigger another read after the current sampling delay. |
| 214 base::MessageLoop::current()->PostDelayedTask( | 214 base::MessageLoop::current()->PostDelayedTask( |
| 215 FROM_HERE, | 215 FROM_HERE, |
| 216 base::Bind(&AccelerometerReader::TriggerRead, | 216 base::Bind(&AccelerometerReader::TriggerRead, |
| 217 weak_factory_.GetWeakPtr()), | 217 weak_factory_.GetWeakPtr()), |
| 218 base::TimeDelta::FromMilliseconds(kDelayBetweenReadsMs)); | 218 base::TimeDelta::FromMilliseconds(kDelayBetweenReadsMs)); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace chromeos | 221 } // namespace chromeos |
| OLD | NEW |