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

Unified Diff: content/browser/device_orientation/device_motion_provider.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: fixed comments, added proper singleton implementation and shutdown. 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/device_motion_provider.cc
diff --git a/content/browser/device_orientation/device_motion_provider.cc b/content/browser/device_orientation/device_motion_provider.cc
index 218ee58d8ac30a9e3299f12e62acc49a0e9153fa..6db5d06ca51cb324cf8ecfea3ef58a178efd35f6 100644
--- a/content/browser/device_orientation/device_motion_provider.cc
+++ b/content/browser/device_orientation/device_motion_provider.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/logging.h"
+#include "content/browser/device_orientation/data_fetcher_shared_memory.h"
#include "content/browser/device_orientation/device_motion_provider.h"
#include "content/common/device_motion_hardware_buffer.h"
@@ -18,6 +19,7 @@ DeviceMotionProvider::DeviceMotionProvider()
}
DeviceMotionProvider::~DeviceMotionProvider() {
+ StopFetchingDeviceMotionData();
}
base::SharedMemoryHandle DeviceMotionProvider::GetSharedMemoryHandleForProcess(
@@ -30,13 +32,13 @@ base::SharedMemoryHandle DeviceMotionProvider::GetSharedMemoryHandleForProcess(
void DeviceMotionProvider::StartFetchingDeviceMotionData() {
if (is_started_)
return;
- // FIXME: call data_fetcher_->StartFetchingDeviceMotionData(
- // SharedMemoryAsHardwareBuffer());
+ DataFetcherSharedMemory::instance()->StartFetchingDeviceMotionData(
+ SharedMemoryAsHardwareBuffer());
is_started_ = true;
}
void DeviceMotionProvider::StopFetchingDeviceMotionData() {
- // FIXME: call data_fetcher_->StopFetchingDeviceMotionData();
+ DataFetcherSharedMemory::instance()->StopFetchingDeviceMotionData();
is_started_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698