Index: content/browser/gamepad/gamepad_service.h |
diff --git a/content/browser/gamepad/gamepad_service.h b/content/browser/gamepad/gamepad_service.h |
index 94620b34b60f901c8b1bfb4865d3092eeb313ee8..2a722bd57897fc6400eb9bb87e989209f087bdf0 100644 |
--- a/content/browser/gamepad/gamepad_service.h |
+++ b/content/browser/gamepad/gamepad_service.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/shared_memory.h" |
#include "base/memory/singleton.h" |
#include "base/threading/thread_checker.h" |
+#include "base/time/time.h" |
#include "content/common/content_export.h" |
namespace content { |
@@ -44,6 +45,20 @@ class CONTENT_EXPORT GamepadService { |
// while a consumer is active. |
void RegisterForUserGesture(const base::Closure& closure); |
+ // Setter amd getter for the last Gamepad Data access timestamp accessed by |
+ // the consumer |
+ void SetGamepadAccessTimestamp(base::Time); |
+ base::Time GetGamepadAccessTimestamp(); |
+ |
+ // Returns the state of polling thread regarding Gamepad Data reads via |
+ // low-level data fetcher i.e. Paused or Resuming |
+ bool GetPollState(); |
+ |
+ // Manages pause and resume state of polling thread in GamepadProvider |
+ // |provider_|. |
+ void Pause(); |
+ void Resume(); |
+ |
// Returns the shared memory handle of the gamepad data duplicated into the |
// given process. |
base::SharedMemoryHandle GetSharedMemoryHandleForProcess( |
@@ -65,6 +80,10 @@ class CONTENT_EXPORT GamepadService { |
virtual ~GamepadService(); |
int num_readers_; |
+ |
+ // Maintans the timestamp for last Gamepad Data access |
+ base::Time gamepad_access_timestamp_; |
+ |
scoped_ptr<GamepadProvider> provider_; |
base::ThreadChecker thread_checker_; |