| 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..201eb06f4766a9d1dacf84a6c8664544b3f4eb8c 100644
|
| --- a/content/browser/gamepad/gamepad_provider.h
|
| +++ b/content/browser/gamepad/gamepad_provider.h
|
| @@ -1,4 +1,5 @@
|
| // Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -43,6 +44,12 @@ class CONTENT_EXPORT GamepadProvider :
|
| base::SharedMemoryHandle GetSharedMemoryHandleForProcess(
|
| base::ProcessHandle renderer_process);
|
|
|
| +#if defined(OS_ANDROID)
|
| + // Returns the state of polling thread regarding Gamepad Data reads via
|
| + // low-level data fetcher i.e. Paused or Resuming
|
| + bool GetPollState();
|
| +#endif
|
| +
|
| // Pause and resume the background polling thread. Can be called from any
|
| // thread.
|
| void Pause();
|
| @@ -93,6 +100,12 @@ 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_;
|
| +
|
| +#if defined(OS_ANDROID)
|
| + // 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_;
|
| +#endif
|
| struct ClosureAndThread {
|
| ClosureAndThread(const base::Closure& c,
|
| const scoped_refptr<base::MessageLoopProxy>& m);
|
|
|