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

Side by Side Diff: services/device/generic_sensor/platform_sensor.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/platform_sensor.h" 5 #include "services/device/generic_sensor/platform_sensor.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "device/generic_sensor/platform_sensor_provider.h" 10 #include "services/device/generic_sensor/platform_sensor_provider.h"
11 #include "device/generic_sensor/public/cpp/platform_sensor_configuration.h" 11 #include "services/device/public/cpp/generic_sensor/platform_sensor_configuratio n.h"
12 12
13 namespace device { 13 namespace device {
14 14
15 PlatformSensor::PlatformSensor(mojom::SensorType type, 15 PlatformSensor::PlatformSensor(mojom::SensorType type,
16 mojo::ScopedSharedBufferMapping mapping, 16 mojo::ScopedSharedBufferMapping mapping,
17 PlatformSensorProvider* provider) 17 PlatformSensorProvider* provider)
18 : task_runner_(base::ThreadTaskRunnerHandle::Get()), 18 : task_runner_(base::ThreadTaskRunnerHandle::Get()),
19 shared_buffer_mapping_(std::move(mapping)), 19 shared_buffer_mapping_(std::move(mapping)),
20 type_(type), 20 type_(type),
21 provider_(provider), 21 provider_(provider),
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 if (!optimal_configuration) { 134 if (!optimal_configuration) {
135 StopSensor(); 135 StopSensor();
136 return true; 136 return true;
137 } 137 }
138 138
139 return StartSensor(*optimal_configuration); 139 return StartSensor(*optimal_configuration);
140 } 140 }
141 141
142 } // namespace device 142 } // namespace device
OLDNEW
« no previous file with comments | « services/device/generic_sensor/platform_sensor.h ('k') | services/device/generic_sensor/platform_sensor_accelerometer_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698