Index: content/browser/device_orientation/data_fetcher_impl_android.cc |
diff --git a/content/browser/device_orientation/data_fetcher_impl_android.cc b/content/browser/device_orientation/data_fetcher_impl_android.cc |
index 03546359ae0fe8ff3e2f8638307f33d9f3408165..395432247bad04504dd82a3670e056138fbc9f8b 100644 |
--- a/content/browser/device_orientation/data_fetcher_impl_android.cc |
+++ b/content/browser/device_orientation/data_fetcher_impl_android.cc |
@@ -8,6 +8,7 @@ |
#include "base/android/scoped_java_ref.h" |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
+#include "content/browser/device_orientation/device_data.h" |
#include "content/browser/device_orientation/orientation.h" |
#include "jni/device_orientation_jni.h" |
@@ -54,6 +55,15 @@ DataFetcherImplAndroid::~DataFetcherImplAndroid() { |
Stop(); |
} |
+bool DataFetcherImplAndroid::GetDeviceData(DeviceData* device_data) { |
+ switch (device_data->device_data_type()) { |
+ case DeviceData::kDeviceOrientationData: |
+ return GetOrientation(static_cast<Orientation*>(device_data)); |
+ default: |
+ return false; |
+ } |
+} |
+ |
bool DataFetcherImplAndroid::GetOrientation(Orientation* orientation) { |
// Do we have a new orientation value? (It's safe to do this outside the lock |
// because we only skip the lock if the value is null. We always enter the |