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 "device/generic_sensor/platform_sensor_provider.h" | 9 #include "device/generic_sensor/platform_sensor_provider.h" |
10 #include "device/generic_sensor/sensor_impl.h" | 10 #include "device/generic_sensor/sensor_impl.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return; | 81 return; |
82 } | 82 } |
83 | 83 |
84 auto sensor_impl = base::MakeUnique<SensorImpl>(sensor); | 84 auto sensor_impl = base::MakeUnique<SensorImpl>(sensor); |
85 | 85 |
86 auto init_params = mojom::SensorInitParams::New(); | 86 auto init_params = mojom::SensorInitParams::New(); |
87 init_params->memory = std::move(cloned_handle); | 87 init_params->memory = std::move(cloned_handle); |
88 init_params->buffer_offset = SensorReadingSharedBuffer::GetOffset(type); | 88 init_params->buffer_offset = SensorReadingSharedBuffer::GetOffset(type); |
89 init_params->mode = sensor->GetReportingMode(); | 89 init_params->mode = sensor->GetReportingMode(); |
90 init_params->default_configuration = sensor->GetDefaultConfiguration(); | 90 init_params->default_configuration = sensor->GetDefaultConfiguration(); |
| 91 init_params->maximum_supported_frequency = |
| 92 sensor->GetMaximumSupportedFrequency(); |
91 | 93 |
92 NotifySensorCreated(std::move(init_params), sensor_impl->GetClient(), | 94 NotifySensorCreated(std::move(init_params), sensor_impl->GetClient(), |
93 callback); | 95 callback); |
94 | 96 |
95 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request)); | 97 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request)); |
96 } | 98 } |
97 | 99 |
98 } // namespace device | 100 } // namespace device |
OLD | NEW |