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

Side by Side Diff: device/sensors/data_fetcher_shared_memory_base.cc

Issue 2646093002: Move //content/browser/device_sensor/ into device/sensors (Closed)
Patch Set: gn format & code rebase Created 3 years, 10 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 "content/browser/device_sensors/data_fetcher_shared_memory_base.h" 5 #include "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 "device/sensors/public/cpp/device_light_hardware_buffer.h"
19 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h" 19 #include "device/sensors/public/cpp/device_motion_hardware_buffer.h"
20 #include "device/sensors/public/cpp/device_orientation_hardware_buffer.h" 20 #include "device/sensors/public/cpp/device_orientation_hardware_buffer.h"
21 21
22 namespace content { 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:
31 case CONSUMER_TYPE_ORIENTATION_ABSOLUTE: 31 case CONSUMER_TYPE_ORIENTATION_ABSOLUTE:
32 return sizeof(DeviceOrientationHardwareBuffer); 32 return sizeof(DeviceOrientationHardwareBuffer);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 base::MessageLoop* DataFetcherSharedMemoryBase::GetPollingMessageLoop() const { 238 base::MessageLoop* DataFetcherSharedMemoryBase::GetPollingMessageLoop() const {
239 return polling_thread_ ? polling_thread_->message_loop() : nullptr; 239 return polling_thread_ ? polling_thread_->message_loop() : nullptr;
240 } 240 }
241 241
242 bool DataFetcherSharedMemoryBase::IsPollingTimerRunningForTesting() const { 242 bool DataFetcherSharedMemoryBase::IsPollingTimerRunningForTesting() const {
243 return polling_thread_ ? polling_thread_->IsTimerRunning() : false; 243 return polling_thread_ ? polling_thread_->IsTimerRunning() : false;
244 } 244 }
245 245
246 } // namespace content 246 } // namespace device
OLDNEW
« no previous file with comments | « device/sensors/data_fetcher_shared_memory_base.h ('k') | device/sensors/data_fetcher_shared_memory_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698