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

Unified Diff: content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc

Issue 680383007: DeviceOrientation API on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 | « content/browser/BUILD.gn ('k') | content/browser/device_sensors/sensor_manager_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_android.cc b/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
similarity index 50%
copy from content/browser/device_sensors/data_fetcher_shared_memory_android.cc
copy to content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
index 477be76585a0cabf129d5e1c0533a28a95ff8269..d68804cf6a722fa8752b1827cf0d7a2863171345 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_android.cc
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
@@ -4,11 +4,7 @@
#include "content/browser/device_sensors/data_fetcher_shared_memory.h"
-#include "base/logging.h"
-#include "content/browser/device_sensors/sensor_manager_android.h"
-#include "content/common/device_sensors/device_light_hardware_buffer.h"
-#include "content/common/device_sensors/device_motion_hardware_buffer.h"
-#include "content/common/device_sensors/device_orientation_hardware_buffer.h"
+#include "content/browser/device_sensors/sensor_manager_chromeos.h"
namespace content {
@@ -20,19 +16,15 @@ DataFetcherSharedMemory::~DataFetcherSharedMemory() {
bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
DCHECK(buffer);
-
switch (consumer_type) {
case CONSUMER_TYPE_MOTION:
- return SensorManagerAndroid::GetInstance()->
- StartFetchingDeviceMotionData(
- static_cast<DeviceMotionHardwareBuffer*>(buffer));
+ return false;
case CONSUMER_TYPE_ORIENTATION:
- return SensorManagerAndroid::GetInstance()->
- StartFetchingDeviceOrientationData(
+ return SensorManagerChromeOS::GetInstance()
+ ->StartFetchingDeviceOrientationData(
static_cast<DeviceOrientationHardwareBuffer*>(buffer));
case CONSUMER_TYPE_LIGHT:
- return SensorManagerAndroid::GetInstance()->StartFetchingDeviceLightData(
- static_cast<DeviceLightHardwareBuffer*>(buffer));
+ return false;
default:
NOTREACHED();
}
@@ -42,14 +34,12 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
switch (consumer_type) {
case CONSUMER_TYPE_MOTION:
- SensorManagerAndroid::GetInstance()->StopFetchingDeviceMotionData();
- return true;
+ return false;
case CONSUMER_TYPE_ORIENTATION:
- SensorManagerAndroid::GetInstance()->StopFetchingDeviceOrientationData();
+ SensorManagerChromeOS::GetInstance()->StopFetchingDeviceOrientationData();
return true;
case CONSUMER_TYPE_LIGHT:
- SensorManagerAndroid::GetInstance()->StopFetchingDeviceLightData();
- return true;
+ return false;
default:
NOTREACHED();
}
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/device_sensors/sensor_manager_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698