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/sensor_provider_impl.h" | 5 #include "device/generic_sensor/sensor_provider_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/single_thread_task_runner.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
11 #include "device/generic_sensor/platform_sensor_provider.h" | 12 #include "device/generic_sensor/platform_sensor_provider.h" |
12 #include "device/generic_sensor/sensor_impl.h" | 13 #include "device/generic_sensor/sensor_impl.h" |
13 #include "mojo/public/cpp/bindings/strong_binding.h" | 14 #include "mojo/public/cpp/bindings/strong_binding.h" |
14 | 15 |
15 namespace device { | 16 namespace device { |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 void RunCallback(mojom::SensorInitParamsPtr init_params, | 20 void RunCallback(mojom::SensorInitParamsPtr init_params, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 init_params->maximum_frequency = maximum_frequency; | 103 init_params->maximum_frequency = maximum_frequency; |
103 | 104 |
104 NotifySensorCreated(std::move(init_params), sensor_impl->GetClient(), | 105 NotifySensorCreated(std::move(init_params), sensor_impl->GetClient(), |
105 callback); | 106 callback); |
106 | 107 |
107 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request)); | 108 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request)); |
108 } | 109 } |
109 | 110 |
110 } // namespace device | 111 } // namespace device |
OLD | NEW |