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 #ifndef CHROME_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_PLATFORM_H_ |
| 6 #define CHROME_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_PLATFORM_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "content/browser/device_orientation/data_fetcher_shared_memory.h" |
| 11 |
| 12 #if defined(OS_ANDROID) |
| 13 #include "content/browser/device_orientation/data_fetcher_impl_android.h" |
| 14 #endif |
| 15 |
| 16 namespace content { |
| 17 |
| 18 #if defined(OS_ANDROID) |
| 19 |
| 20 typedef DataFetcherImplAndroid SharedMemoryPlatformDataFetcher; |
| 21 |
| 22 #else |
| 23 |
| 24 typedef SharedMemoryPlatformDataFetcherEmpty SharedMemoryPlatformDataFetcher; |
| 25 |
| 26 #endif |
| 27 |
| 28 class SharedMemoryPlatformDataFetcherEmpty : public DataFetcherSharedMemory { |
| 29 public: |
| 30 static SharedMemoryPlatformDataFetcherEmpty* instance(); |
| 31 |
| 32 virtual bool NeedsPolling() OVERRIDE; |
| 33 virtual bool FetchDeviceMotionDataIntoBuffer() OVERRIDE; |
| 34 virtual bool StartFetchingDeviceMotionData( |
| 35 DeviceMotionHardwareBuffer* buffer) OVERRIDE; |
| 36 virtual void StopFetchingDeviceMotionData() OVERRIDE; |
| 37 |
| 38 private: |
| 39 SharedMemoryPlatformDataFetcherEmpty(); |
| 40 virtual ~SharedMemoryPlatformDataFetcherEmpty() { } |
| 41 |
| 42 DeviceMotionHardwareBuffer* device_motion_buffer_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(SharedMemoryPlatformDataFetcherEmpty); |
| 45 }; |
| 46 |
| 47 } // namespace content |
| 48 |
| 49 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_PLATFORM_H_ |
OLD | NEW |