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