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

Unified Diff: content/browser/device_orientation/data_fetcher_shared_memory_android.cc

Issue 152893002: [DeviceLight API] Content Side Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix in Java file, stop() Created 6 years, 9 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
Index: content/browser/device_orientation/data_fetcher_shared_memory_android.cc
diff --git a/content/browser/device_orientation/data_fetcher_shared_memory_android.cc b/content/browser/device_orientation/data_fetcher_shared_memory_android.cc
index 8a4f52dd11bacb4a71b7167cfeef5c8f16ade8b7..2d41ed8d0453e740535eccf3b7bdcf6c321995a7 100644
--- a/content/browser/device_orientation/data_fetcher_shared_memory_android.cc
+++ b/content/browser/device_orientation/data_fetcher_shared_memory_android.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "content/browser/device_orientation/sensor_manager_android.h"
+#include "content/common/device_light/device_light_hardware_buffer.h"
#include "content/common/device_orientation/device_motion_hardware_buffer.h"
#include "content/common/device_orientation/device_orientation_hardware_buffer.h"
@@ -29,6 +30,10 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
return SensorManagerAndroid::GetInstance()->
StartFetchingDeviceOrientationData(
static_cast<DeviceOrientationHardwareBuffer*>(buffer));
+ case CONSUMER_TYPE_LIGHT:
+ return SensorManagerAndroid::GetInstance()->
+ StartFetchingDeviceLightData(
+ static_cast<DeviceLightHardwareBuffer*>(buffer));
default:
NOTREACHED();
}
@@ -43,6 +48,10 @@ bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
case CONSUMER_TYPE_ORIENTATION:
SensorManagerAndroid::GetInstance()->StopFetchingDeviceOrientationData();
return true;
+ case CONSUMER_TYPE_LIGHT:
+ SensorManagerAndroid::GetInstance()->
+ StopFetchingDeviceLightData();
+ return true;
default:
NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698