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

Side by Side Diff: content/browser/device_orientation/data_fetcher_shared_memory.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 CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_
6 #define CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_
7
8 #include "content/browser/device_orientation/device_data.h"
9 #include "content/common/device_motion_hardware_buffer.h"
10
11 namespace WebKit {
12 class WebDeviceMotionData;
13 }
14
15 namespace content {
16
17 class DataFetcherSharedMemory {
bulach 2013/07/04 08:23:36 in the "vibration API" review, jam@ pointed out to
timvolodine 2013/07/04 12:02:52 hmm, yes that looks like the normal way to go. How
18 public:
19 virtual ~DataFetcherSharedMemory() {}
20
21 // Returns true if this fetcher needs explicit calls to fetch the data.
22 virtual bool NeedsPolling() = 0;
23
24 // If this fetcher needsPolling() is true, this method will update the
25 // buffer with the latest device motion data.
26 // This method will do nothing if needsPolling() is false.
27 // Returns true if there was any motion data to update the buffer with.
28 virtual bool FetchDeviceMotionDataIntoBuffer() = 0;
29
30 // Returns true if the relevant sensors could be successfully activated.
31 // This method should be called before any calls to
32 // FetchDeviceMotionDataIntoBuffer().
33 virtual bool StartFetchingDeviceMotionData(
34 DeviceMotionHardwareBuffer* buffer) = 0;
35
36 // Indicates to the fetcher to stop fetching device data.
37 virtual void StopFetchingDeviceMotionData() = 0;
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DATA_FETCHER_SHARED_MEMORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698