OLD | NEW |
(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 |
OLD | NEW |