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 NOTREACHED(); |
| 13 } |
| 14 |
| 15 DataFetcherSharedMemory* |
| 16 DataFetcherSharedMemory::instance() { |
| 17 CR_DEFINE_STATIC_LOCAL(DataFetcherSharedMemory, |
| 18 s_data_fetcher_android, ()); |
| 19 return &s_data_fetcher_android; |
| 20 } |
| 21 |
| 22 bool DataFetcherSharedMemory::NeedsPolling() { |
| 23 return DataFetcherImplAndroid::GetInstance()->NeedsPolling(); |
| 24 } |
| 25 |
| 26 bool DataFetcherSharedMemory::FetchDeviceMotionDataIntoBuffer() { |
| 27 return DataFetcherImplAndroid::GetInstance()-> |
| 28 FetchDeviceMotionDataIntoBuffer(); |
| 29 } |
| 30 |
| 31 bool DataFetcherSharedMemory::StartFetchingDeviceMotionData( |
| 32 DeviceMotionHardwareBuffer* buffer) { |
| 33 device_motion_buffer_ = buffer; |
| 34 return DataFetcherImplAndroid::GetInstance()-> |
| 35 StartFetchingDeviceMotionData(buffer); |
| 36 } |
| 37 |
| 38 void DataFetcherSharedMemory::StopFetchingDeviceMotionData() { |
| 39 DataFetcherImplAndroid::GetInstance()->StopFetchingDeviceMotionData(); |
| 40 } |
| 41 |
| 42 } // namespace content |
OLD | NEW |