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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3ebac8c8f5fb8661a859721030f9b435e9519b66 |
--- /dev/null |
+++ b/content/browser/device_orientation/data_fetcher_shared_memory_android.cc |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "data_fetcher_shared_memory.h" |
+ |
+#include "base/logging.h" |
+#include "data_fetcher_impl_android.h" |
+ |
+namespace content { |
+ |
+DataFetcherSharedMemory::~DataFetcherSharedMemory() { |
+ StopFetchingDeviceMotionData(); |
+} |
+ |
+bool DataFetcherSharedMemory::NeedsPolling() { |
+ return DataFetcherImplAndroid::GetInstance()->NeedsPolling(); |
bulach
2013/07/12 14:00:41
nit: I think this can return false directly..
timvolodine
2013/07/12 15:22:18
Done.
|
+} |
+ |
+bool DataFetcherSharedMemory::FetchDeviceMotionDataIntoBuffer() { |
+ return DataFetcherImplAndroid::GetInstance()-> |
+ FetchDeviceMotionDataIntoBuffer(); |
+} |
+ |
+bool DataFetcherSharedMemory::StartFetchingDeviceMotionData( |
+ DeviceMotionHardwareBuffer* buffer) { |
bulach
2013/07/12 14:00:41
nit: indent +2
timvolodine
2013/07/12 15:22:18
Done.
|
+ device_motion_buffer_ = buffer; |
+ return DataFetcherImplAndroid::GetInstance()-> |
+ StartFetchingDeviceMotionData(buffer); |
+} |
+ |
+void DataFetcherSharedMemory::StopFetchingDeviceMotionData() { |
+ DataFetcherImplAndroid::GetInstance()->StopFetchingDeviceMotionData(); |
+} |
+ |
+} // namespace content |