Index: content/browser/device_sensors/data_fetcher_shared_memory_default.cc |
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_default.cc b/content/browser/device_sensors/data_fetcher_shared_memory_default.cc |
index 5294e8ee5db1d40ce2092fd12e48b4b3768bcb7a..b111b7b1fc045c46f26ed7c18cac5574180a95c0 100644 |
--- a/content/browser/device_sensors/data_fetcher_shared_memory_default.cc |
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_default.cc |
@@ -6,6 +6,7 @@ |
#include "base/logging.h" |
#include "base/metrics/histogram.h" |
+#include "content/public/browser/sensor_manager.h" |
namespace { |
@@ -63,6 +64,8 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) { |
static_cast<DeviceOrientationHardwareBuffer*>(buffer); |
UMA_HISTOGRAM_BOOLEAN("InertialSensor.OrientationDefaultAvailable", |
false); |
+ SensorManager::GetInstance()->StartFetchingDeviceOrientationData( |
timvolodine
2014/11/06 02:53:47
this line shouldn't be here. the purpose of _defau
jonross
2014/11/06 18:18:52
Done.
|
+ orientation_buffer_); |
return SetOrientationBuffer(orientation_buffer_, true); |
case CONSUMER_TYPE_LIGHT: |
light_buffer_ = static_cast<DeviceLightHardwareBuffer*>(buffer); |
@@ -79,6 +82,7 @@ bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) { |
case CONSUMER_TYPE_MOTION: |
return SetMotionBuffer(motion_buffer_, false); |
case CONSUMER_TYPE_ORIENTATION: |
+ SensorManager::GetInstance()->StopFetchingDeviceOrientationData(); |
return SetOrientationBuffer(orientation_buffer_, false); |
case CONSUMER_TYPE_LIGHT: |
return SetLightBuffer(light_buffer_, -1); |