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

Side by Side 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: fixed some includes 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "data_fetcher_impl_android.h"
7 #include "data_fetcher_shared_memory.h"
8
9 namespace content {
10
11 DataFetcherSharedMemory::~DataFetcherSharedMemory() {
12 }
13
14 DataFetcherSharedMemory*
15 DataFetcherSharedMemory::instance() {
16 CR_DEFINE_STATIC_LOCAL(DataFetcherSharedMemory,
17 s_data_fetcher_android, ());
18 return &s_data_fetcher_android;
19 }
20
21 bool DataFetcherSharedMemory::NeedsPolling() {
22 return DataFetcherImplAndroid::instance()->NeedsPolling();
23 }
24
25 bool DataFetcherSharedMemory::FetchDeviceMotionDataIntoBuffer() {
26 return DataFetcherImplAndroid::instance()->FetchDeviceMotionDataIntoBuffer();
27 }
28
29 bool DataFetcherSharedMemory::StartFetchingDeviceMotionData(
30 DeviceMotionHardwareBuffer* buffer) {
31 device_motion_buffer_ = buffer;
32 return DataFetcherImplAndroid::instance()->
33 StartFetchingDeviceMotionData(buffer);
34 }
35
36 void DataFetcherSharedMemory::StopFetchingDeviceMotionData() {
37 DataFetcherImplAndroid::instance()->StopFetchingDeviceMotionData();
38 }
39
40 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698