Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: content/renderer/gamepad_shared_memory_reader.h

Issue 133943002: Gamepad API support for chrome on android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ 5 #ifndef CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
6 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ 6 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "third_party/WebKit/public/platform/WebGamepads.h" 10 #include "third_party/WebKit/public/platform/WebGamepads.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 struct GamepadHardwareBuffer; 14 struct GamepadHardwareBuffer;
15 15
16 class GamepadSharedMemoryReader { 16 class GamepadSharedMemoryReader {
17 public: 17 public:
18 GamepadSharedMemoryReader(); 18 GamepadSharedMemoryReader();
19 virtual ~GamepadSharedMemoryReader(); 19 virtual ~GamepadSharedMemoryReader();
20 void ResumeGamepads();
21 void PauseGamepads();
20 void SampleGamepads(blink::WebGamepads&); 22 void SampleGamepads(blink::WebGamepads&);
21 23
22 private: 24 private:
23 base::SharedMemoryHandle renderer_shared_memory_handle_; 25 base::SharedMemoryHandle renderer_shared_memory_handle_;
24 scoped_ptr<base::SharedMemory> renderer_shared_memory_; 26 scoped_ptr<base::SharedMemory> renderer_shared_memory_;
25 GamepadHardwareBuffer* gamepad_hardware_buffer_; 27 GamepadHardwareBuffer* gamepad_hardware_buffer_;
26 28
27 bool ever_interacted_with_; 29 bool ever_interacted_with_;
28 }; 30 };
29 31
30 } // namespace content 32 } // namespace content
31 33
32 #endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ 34 #endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698