OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 4 // found in the LICENSE file. |
4 | 5 |
5 #ifndef CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ | 6 #ifndef CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ |
6 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ | 7 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ |
7 | 8 |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
10 #include "third_party/WebKit/public/platform/WebGamepads.h" | 11 #include "third_party/WebKit/public/platform/WebGamepads.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 struct GamepadHardwareBuffer; | 15 struct GamepadHardwareBuffer; |
15 | 16 |
16 class GamepadSharedMemoryReader { | 17 class GamepadSharedMemoryReader { |
17 public: | 18 public: |
18 GamepadSharedMemoryReader(); | 19 GamepadSharedMemoryReader(); |
19 virtual ~GamepadSharedMemoryReader(); | 20 virtual ~GamepadSharedMemoryReader(); |
21 #if defined(OS_ANDROID) | |
22 void ResumeGamepads(); | |
scottmg
2014/01/13 19:42:43
Could you explain why the renderer is calling thes
SaurabhK
2014/01/15 16:57:08
According to my observation polling thread which g
| |
23 void PauseGamepads(); | |
24 #endif | |
20 void SampleGamepads(blink::WebGamepads&); | 25 void SampleGamepads(blink::WebGamepads&); |
21 | 26 |
22 private: | 27 private: |
23 base::SharedMemoryHandle renderer_shared_memory_handle_; | 28 base::SharedMemoryHandle renderer_shared_memory_handle_; |
24 scoped_ptr<base::SharedMemory> renderer_shared_memory_; | 29 scoped_ptr<base::SharedMemory> renderer_shared_memory_; |
25 GamepadHardwareBuffer* gamepad_hardware_buffer_; | 30 GamepadHardwareBuffer* gamepad_hardware_buffer_; |
26 | 31 |
27 bool ever_interacted_with_; | 32 bool ever_interacted_with_; |
28 }; | 33 }; |
29 | 34 |
30 } // namespace content | 35 } // namespace content |
31 | 36 |
32 #endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ | 37 #endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ |
OLD | NEW |