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

Side by Side Diff: services/device/sensors/data_fetcher_shared_memory_base.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_base.h" 5 #include "services/device/sensors/data_fetcher_shared_memory_base.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "device/sensors/public/cpp/device_light_hardware_buffer.h" 18 #include "services/device/public/cpp/sensors/device_light_hardware_buffer.h"
19 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h" 19 #include "services/device/public/cpp/sensors/device_motion_hardware_buffer.h"
20 #include "device/sensors/public/cpp/device_orientation_hardware_buffer.h" 20 #include "services/device/public/cpp/sensors/device_orientation_hardware_buffer. h"
21 21
22 namespace device { 22 namespace device {
23 23
24 namespace { 24 namespace {
25 25
26 size_t GetConsumerSharedMemoryBufferSize(ConsumerType consumer_type) { 26 size_t GetConsumerSharedMemoryBufferSize(ConsumerType consumer_type) {
27 switch (consumer_type) { 27 switch (consumer_type) {
28 case CONSUMER_TYPE_MOTION: 28 case CONSUMER_TYPE_MOTION:
29 return sizeof(DeviceMotionHardwareBuffer); 29 return sizeof(DeviceMotionHardwareBuffer);
30 case CONSUMER_TYPE_ORIENTATION: 30 case CONSUMER_TYPE_ORIENTATION:
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 base::MessageLoop* DataFetcherSharedMemoryBase::GetPollingMessageLoop() const { 242 base::MessageLoop* DataFetcherSharedMemoryBase::GetPollingMessageLoop() const {
243 return polling_thread_ ? polling_thread_->message_loop() : nullptr; 243 return polling_thread_ ? polling_thread_->message_loop() : nullptr;
244 } 244 }
245 245
246 bool DataFetcherSharedMemoryBase::IsPollingTimerRunningForTesting() const { 246 bool DataFetcherSharedMemoryBase::IsPollingTimerRunningForTesting() const {
247 return polling_thread_ ? polling_thread_->IsTimerRunning() : false; 247 return polling_thread_ ? polling_thread_->IsTimerRunning() : false;
248 } 248 }
249 249
250 } // namespace device 250 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698