Chromium Code Reviews| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 } | 89 } |
| 90 | 90 |
| 91 auto sensor_impl = base::MakeUnique<SensorImpl>(sensor); | 91 auto sensor_impl = base::MakeUnique<SensorImpl>(sensor); |
| 92 | 92 |
| 93 auto init_params = mojom::SensorInitParams::New(); | 93 auto init_params = mojom::SensorInitParams::New(); |
| 94 init_params->memory = std::move(cloned_handle); | 94 init_params->memory = std::move(cloned_handle); |
| 95 init_params->buffer_offset = GetBufferOffset(type); | 95 init_params->buffer_offset = GetBufferOffset(type); |
| 96 init_params->mode = sensor->GetReportingMode(); | 96 init_params->mode = sensor->GetReportingMode(); |
| 97 init_params->default_configuration = sensor->GetDefaultConfiguration(); | 97 init_params->default_configuration = sensor->GetDefaultConfiguration(); |
| 98 | 98 |
| 99 NotifySensorCreated(std::move(init_params), sensor_impl.get(), callback); | |
|
timvolodine
2016/10/05 17:59:35
is the order of Notify and MakeStrongBinding impor
| |
| 100 | |
| 99 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request)); | 101 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request)); |
| 100 | |
| 101 NotifySensorCreated(nullptr, nullptr, callback); | |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace device | 104 } // namespace device |
| OLD | NEW |