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

Unified Diff: content/renderer/gamepad_shared_memory_reader.h

Issue 8689011: Renderer reading side of gamepad (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase to HEAD Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/gamepad_shared_memory_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gamepad_shared_memory_reader.h
diff --git a/content/renderer/gamepad_shared_memory_reader.h b/content/renderer/gamepad_shared_memory_reader.h
new file mode 100644
index 0000000000000000000000000000000000000000..d8492abd90696cfd413c026f0debfeebfd935c7b
--- /dev/null
+++ b/content/renderer/gamepad_shared_memory_reader.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GAMEPAD_UTIL_H_
+#define GAMEPAD_UTIL_H_
+
+#include "base/shared_memory.h"
+#include "base/memory/scoped_ptr.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebGamepads.h"
+
+namespace content {
+
+struct GamepadHardwareBuffer;
+
+class GamepadSharedMemoryReader {
+ public:
+ GamepadSharedMemoryReader();
+ virtual ~GamepadSharedMemoryReader();
+ void SampleGamepads(WebKit::WebGamepads&);
+
+ private:
+ base::SharedMemoryHandle renderer_shared_memory_handle_;
+ scoped_ptr<base::SharedMemory> renderer_shared_memory_;
+ GamepadHardwareBuffer* gamepad_hardware_buffer_;
+
+ bool ever_interacted_with_[WebKit::WebGamepads::itemsLengthCap];
+};
+
+} // namespace content
+
+#endif // GAMEPAD_UTIL_H_
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/gamepad_shared_memory_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698