Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: content/browser/device_orientation/data_fetcher_shared_memory_android.cc

Issue 18572014: Implement Android shared memory data fetcher for Device Motion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-sync-12June-tryASYNC-2-bis-tryRebase-6
Patch Set: rebased Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..3944ad997af863d27f8e0a50110f4415eee470b2
--- /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 false;
+}
+
+bool DataFetcherSharedMemory::FetchDeviceMotionDataIntoBuffer() {
+ NOTREACHED();
+ return false;
+}
+
+bool DataFetcherSharedMemory::StartFetchingDeviceMotionData(
+ DeviceMotionHardwareBuffer* buffer) {
+ device_motion_buffer_ = buffer;
+ return DataFetcherImplAndroid::GetInstance()->
+ StartFetchingDeviceMotionData(buffer);
+}
+
+void DataFetcherSharedMemory::StopFetchingDeviceMotionData() {
+ DataFetcherImplAndroid::GetInstance()->StopFetchingDeviceMotionData();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698