Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: services/device/generic_sensor/sensor_provider_impl.cc

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "services/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/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
11 #include "device/generic_sensor/platform_sensor_provider.h"
12 #include "device/generic_sensor/sensor_impl.h"
13 #include "mojo/public/cpp/bindings/strong_binding.h" 11 #include "mojo/public/cpp/bindings/strong_binding.h"
12 #include "services/device/generic_sensor/platform_sensor_provider.h"
13 #include "services/device/generic_sensor/sensor_impl.h"
14 14
15 namespace device { 15 namespace device {
16 16
17 namespace { 17 namespace {
18 18
19 void RunCallback(mojom::SensorInitParamsPtr init_params, 19 void RunCallback(mojom::SensorInitParamsPtr init_params,
20 mojom::SensorClientRequest client, 20 mojom::SensorClientRequest client,
21 const SensorProviderImpl::GetSensorCallback& callback) { 21 const SensorProviderImpl::GetSensorCallback& callback) {
22 callback.Run(std::move(init_params), std::move(client)); 22 callback.Run(std::move(init_params), std::move(client));
23 } 23 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 init_params->minimum_frequency = sensor->GetMinimumSupportedFrequency(); 103 init_params->minimum_frequency = sensor->GetMinimumSupportedFrequency();
104 DCHECK_GT(init_params->minimum_frequency, 0.0); 104 DCHECK_GT(init_params->minimum_frequency, 0.0);
105 105
106 NotifySensorCreated(std::move(init_params), sensor_impl->GetClient(), 106 NotifySensorCreated(std::move(init_params), sensor_impl->GetClient(),
107 callback); 107 callback);
108 108
109 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request)); 109 mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request));
110 } 110 }
111 111
112 } // namespace device 112 } // namespace device
OLDNEW
« no previous file with comments | « services/device/generic_sensor/sensor_provider_impl.h ('k') | services/device/public/cpp/generic_sensor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698