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

Side by Side Diff: content/browser/device_orientation/data_fetcher_platform.h

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: added OWNERS file 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 #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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698