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(); |
} |