Index: content/browser/device_orientation/data_fetcher_shared_memory.h |
diff --git a/content/browser/device_orientation/data_fetcher_shared_memory.h b/content/browser/device_orientation/data_fetcher_shared_memory.h |
index 8168e87134e9b119ec881f4f4da4d698320bbe2b..dc5e92ae160d633d7f011f938946da7b05ef461b 100644 |
--- a/content/browser/device_orientation/data_fetcher_shared_memory.h |
+++ b/content/browser/device_orientation/data_fetcher_shared_memory.h |
@@ -14,31 +14,39 @@ class WebDeviceMotionData; |
namespace content { |
-class DataFetcherSharedMemory { |
+class CONTENT_EXPORT DataFetcherSharedMemory { |
public: |
- DataFetcherSharedMemory() : device_motion_buffer_(NULL) { } |
+ DataFetcherSharedMemory() |
+ : device_motion_buffer_(NULL), |
+ started_(false) { } |
virtual ~DataFetcherSharedMemory(); |
// Returns true if this fetcher needs explicit calls to fetch the data. |
+ // Called from any thread. |
virtual bool NeedsPolling(); |
// If this fetcher NeedsPolling() is true, this method will update the |
// buffer with the latest device motion data. |
- // This method will do nothing if NeedsPolling() is false. |
// Returns true if there was any motion data to update the buffer with. |
+ // Called from the DeviceMotionProvider::PollingThread. |
virtual bool FetchDeviceMotionDataIntoBuffer(); |
// Returns true if the relevant sensors could be successfully activated. |
// This method should be called before any calls to |
// FetchDeviceMotionDataIntoBuffer(). |
+ // If NeedsPolling() is true this method should be called from the |
+ // PollingThread. |
virtual bool StartFetchingDeviceMotionData( |
DeviceMotionHardwareBuffer* buffer); |
// Indicates to the fetcher to stop fetching device data. |
+ // If NeedsPolling() is true this method should be called from the |
+ // PollingThread. |
virtual void StopFetchingDeviceMotionData(); |
private: |
DeviceMotionHardwareBuffer* device_motion_buffer_; |
+ bool started_; |
DISALLOW_COPY_AND_ASSIGN(DataFetcherSharedMemory); |
}; |