| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_ | 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_ |
| 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_ | 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 base::SharedMemoryHandle GetRendererSharedMemoryHandle( | 34 base::SharedMemoryHandle GetRendererSharedMemoryHandle( |
| 35 base::ProcessHandle renderer_process); | 35 base::ProcessHandle renderer_process); |
| 36 | 36 |
| 37 // Pause and resume the background polling thread. Can be called from any | 37 // Pause and resume the background polling thread. Can be called from any |
| 38 // thread. | 38 // thread. |
| 39 void Pause(); | 39 void Pause(); |
| 40 void Resume(); | 40 void Resume(); |
| 41 | 41 |
| 42 // base::SystemMonitor::DevicesChangedObserver implementation. | 42 // base::SystemMonitor::DevicesChangedObserver implementation. |
| 43 virtual void OnDevicesChanged() OVERRIDE; | 43 virtual void OnDevicesChanged(base::SystemMonitor::DeviceType type) OVERRIDE; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 | 46 |
| 47 // Method for setting up the platform-specific data fetcher. Takes ownership | 47 // Method for setting up the platform-specific data fetcher. Takes ownership |
| 48 // of |fetcher|. | 48 // of |fetcher|. |
| 49 void DoInitializePollingThread(GamepadDataFetcher* fetcher); | 49 void DoInitializePollingThread(GamepadDataFetcher* fetcher); |
| 50 | 50 |
| 51 // Method for sending pause hints to the low-level data fetcher. Runs on | 51 // Method for sending pause hints to the low-level data fetcher. Runs on |
| 52 // polling_thread_. | 52 // polling_thread_. |
| 53 void SendPauseHint(bool paused); | 53 void SendPauseHint(bool paused); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 scoped_ptr<base::Thread> polling_thread_; | 87 scoped_ptr<base::Thread> polling_thread_; |
| 88 | 88 |
| 89 static GamepadProvider* instance_; | 89 static GamepadProvider* instance_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(GamepadProvider); | 91 DISALLOW_COPY_AND_ASSIGN(GamepadProvider); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace content | 94 } // namespace content |
| 95 | 95 |
| 96 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_ | 96 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_PROVIDER_H_ |
| OLD | NEW |