| Index: content/browser/gamepad/gamepad_provider.h
|
| diff --git a/content/browser/gamepad/gamepad_provider.h b/content/browser/gamepad/gamepad_provider.h
|
| index 5f10f137a14ed8311b94a25d7242fa9596ef227f..488aff6934a5e6f722f9e15b6909a7c4405f7d20 100644
|
| --- a/content/browser/gamepad/gamepad_provider.h
|
| +++ b/content/browser/gamepad/gamepad_provider.h
|
| @@ -43,6 +43,10 @@ class CONTENT_EXPORT GamepadProvider :
|
| base::SharedMemoryHandle GetSharedMemoryHandleForProcess(
|
| base::ProcessHandle renderer_process);
|
|
|
| + // Returns the state of polling thread regarding Gamepad Data reads via
|
| + // low-level data fetcher i.e. Paused or Resuming
|
| + bool GetPollState();
|
| +
|
| // Pause and resume the background polling thread. Can be called from any
|
| // thread.
|
| void Pause();
|
| @@ -93,6 +97,11 @@ class CONTENT_EXPORT GamepadProvider :
|
| // thread, the message loop proxies will normally just be the I/O thread.
|
| // However, this will be the main thread for unit testing.
|
| base::Lock user_gesture_lock_;
|
| +
|
| + // Maximum time allowed for the thread before polling gets paused in
|
| + // milliseconds after last gamepad data access from consumer
|
| + static const int64 max_timestamp_before_pause_;
|
| +
|
| struct ClosureAndThread {
|
| ClosureAndThread(const base::Closure& c,
|
| const scoped_refptr<base::MessageLoopProxy>& m);
|
|
|