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

Unified Diff: device/sensors/data_fetcher_shared_memory_android.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/sensors/data_fetcher_shared_memory.h ('k') | device/sensors/data_fetcher_shared_memory_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/sensors/data_fetcher_shared_memory_android.cc
diff --git a/device/sensors/data_fetcher_shared_memory_android.cc b/device/sensors/data_fetcher_shared_memory_android.cc
deleted file mode 100644
index 5dec86a1ab0b18b725a9024a990e99c64d2e434c..0000000000000000000000000000000000000000
--- a/device/sensors/data_fetcher_shared_memory_android.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "device/sensors/data_fetcher_shared_memory.h"
-
-#include "base/logging.h"
-#include "device/sensors/public/cpp/device_light_hardware_buffer.h"
-#include "device/sensors/public/cpp/device_motion_hardware_buffer.h"
-#include "device/sensors/public/cpp/device_orientation_hardware_buffer.h"
-#include "device/sensors/sensor_manager_android.h"
-
-namespace device {
-
-DataFetcherSharedMemory::DataFetcherSharedMemory() {}
-
-DataFetcherSharedMemory::~DataFetcherSharedMemory() {}
-
-bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
- DCHECK(buffer);
-
- switch (consumer_type) {
- case CONSUMER_TYPE_MOTION:
- SensorManagerAndroid::GetInstance()->StartFetchingDeviceMotionData(
- static_cast<DeviceMotionHardwareBuffer*>(buffer));
- return true;
- case CONSUMER_TYPE_ORIENTATION:
- SensorManagerAndroid::GetInstance()->StartFetchingDeviceOrientationData(
- static_cast<DeviceOrientationHardwareBuffer*>(buffer));
- return true;
- case CONSUMER_TYPE_ORIENTATION_ABSOLUTE:
- SensorManagerAndroid::GetInstance()
- ->StartFetchingDeviceOrientationAbsoluteData(
- static_cast<DeviceOrientationHardwareBuffer*>(buffer));
- return true;
- case CONSUMER_TYPE_LIGHT:
- SensorManagerAndroid::GetInstance()->StartFetchingDeviceLightData(
- static_cast<DeviceLightHardwareBuffer*>(buffer));
- return true;
- default:
- NOTREACHED();
- }
- return false;
-}
-
-bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
- switch (consumer_type) {
- case CONSUMER_TYPE_MOTION:
- SensorManagerAndroid::GetInstance()->StopFetchingDeviceMotionData();
- return true;
- case CONSUMER_TYPE_ORIENTATION:
- SensorManagerAndroid::GetInstance()->StopFetchingDeviceOrientationData();
- return true;
- case CONSUMER_TYPE_ORIENTATION_ABSOLUTE:
- SensorManagerAndroid::GetInstance()
- ->StopFetchingDeviceOrientationAbsoluteData();
- return true;
- case CONSUMER_TYPE_LIGHT:
- SensorManagerAndroid::GetInstance()->StopFetchingDeviceLightData();
- return true;
- default:
- NOTREACHED();
- }
- return false;
-}
-
-void DataFetcherSharedMemory::Shutdown() {
- DataFetcherSharedMemoryBase::Shutdown();
- SensorManagerAndroid::GetInstance()->Shutdown();
-}
-
-} // namespace device
« no previous file with comments | « device/sensors/data_fetcher_shared_memory.h ('k') | device/sensors/data_fetcher_shared_memory_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698