| 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_win.h" | 5 #include "services/device/generic_sensor/platform_sensor_win.h" |
| 6 |
| 6 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 7 | 8 |
| 8 namespace device { | 9 namespace device { |
| 9 | 10 |
| 10 namespace { | 11 namespace { |
| 11 constexpr double kDefaultSensorReportingFrequency = 5.0; | 12 constexpr double kDefaultSensorReportingFrequency = 5.0; |
| 12 } // namespace | 13 } // namespace |
| 13 | 14 |
| 14 PlatformSensorWin::PlatformSensorWin( | 15 PlatformSensorWin::PlatformSensorWin( |
| 15 mojom::SensorType type, | 16 mojom::SensorType type, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 base::Time::kMillisecondsPerSecond / minimal_reporting_interval_ms; | 78 base::Time::kMillisecondsPerSecond / minimal_reporting_interval_ms; |
| 78 return configuration.frequency() <= max_frequency; | 79 return configuration.frequency() <= max_frequency; |
| 79 } | 80 } |
| 80 | 81 |
| 81 PlatformSensorWin::~PlatformSensorWin() { | 82 PlatformSensorWin::~PlatformSensorWin() { |
| 82 sensor_reader_->SetClient(nullptr); | 83 sensor_reader_->SetClient(nullptr); |
| 83 sensor_thread_runner_->DeleteSoon(FROM_HERE, sensor_reader_); | 84 sensor_thread_runner_->DeleteSoon(FROM_HERE, sensor_reader_); |
| 84 } | 85 } |
| 85 | 86 |
| 86 } // namespace device | 87 } // namespace device |
| OLD | NEW |