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

Side by Side Diff: services/device/sensors/data_fetcher_shared_memory_mac.cc

Issue 2819273006: Move //device/sensor impl to be part of the internal implemenation of the Device Service. (Closed)
Patch Set: Move //device/sensor impl to be part of the internal implemenation of the Device Service Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sensors/data_fetcher_shared_memory.h" 5 #include "services/device/sensors/data_fetcher_shared_memory.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "device/sensors/ambient_light_mac.h" 12 #include "services/device/public/cpp/sensors/device_util_mac.h"
13 #include "device/sensors/public/cpp/device_util_mac.h" 13 #include "services/device/sensors/ambient_light_mac.h"
14 #include "third_party/sudden_motion_sensor/sudden_motion_sensor_mac.h" 14 #include "third_party/sudden_motion_sensor/sudden_motion_sensor_mac.h"
15 15
16 namespace device { 16 namespace device {
17 17
18 const double kMeanGravity = 9.80665; 18 const double kMeanGravity = 9.80665;
19 19
20 void FetchLight(AmbientLightSensor* sensor, DeviceLightHardwareBuffer* buffer) { 20 void FetchLight(AmbientLightSensor* sensor, DeviceLightHardwareBuffer* buffer) {
21 DCHECK(sensor); 21 DCHECK(sensor);
22 DCHECK(buffer); 22 DCHECK(buffer);
23 // Macbook pro has 2 lux values, left and right, we take the average. 23 // Macbook pro has 2 lux values, left and right, we take the average.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 light_buffer_ = nullptr; 246 light_buffer_ = nullptr;
247 } 247 }
248 return true; 248 return true;
249 default: 249 default:
250 NOTREACHED(); 250 NOTREACHED();
251 } 251 }
252 return false; 252 return false;
253 } 253 }
254 254
255 } // namespace device 255 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698