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 e51af51370e17c86803045e94fcd27d8c936c66f..de01458b49346d74030be0959af16bb5d3bd6ffd 100644 |
--- a/content/browser/device_orientation/data_fetcher_impl_android.cc |
+++ b/content/browser/device_orientation/data_fetcher_impl_android.cc |
@@ -54,7 +54,14 @@ DataFetcherImplAndroid::~DataFetcherImplAndroid() { |
Stop(); |
} |
-bool DataFetcherImplAndroid::GetOrientation(Orientation* orientation) { |
+const DeviceData* DataFetcherImplAndroid::GetDeviceData( |
+ DeviceData::Type* type) { |
hans
2012/07/30 16:12:52
hmm, should "Type*" be "Type"?
aousterh
2012/08/03 11:08:14
Oops, thanks for catching that. Done.
|
+ if (type != DeviceData::kTypeOrientation) |
+ return NULL; |
+ return GetOrientation(); |
+} |
+ |
+const Orientation* DataFetcherImplAndroid::GetOrientation() { |
// 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 |
// lock if we're going to make use of the new value.) |
@@ -62,9 +69,10 @@ bool DataFetcherImplAndroid::GetOrientation(Orientation* orientation) { |
base::AutoLock autolock(next_orientation_lock_); |
next_orientation_.swap(current_orientation_); |
} |
+ scoped_refptr<Orientation> orientation(new Orientation()); |
if (current_orientation_.get()) |
*orientation = *current_orientation_; |
- return true; |
+ return orientation; |
} |
void DataFetcherImplAndroid::GotOrientation( |