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

Unified Diff: Source/modules/gamepad/WebKitGamepad.h

Issue 183313003: Added non-prefixed navigator.getGamepads() with updated API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/gamepad/WebKitGamepad.h
diff --git a/Source/modules/gamepad/WebKitGamepad.h b/Source/modules/gamepad/WebKitGamepad.h
new file mode 100644
index 0000000000000000000000000000000000000000..7a4f34c1d55c104e07ae6521d235ea4fd26c0a5a
--- /dev/null
+++ b/Source/modules/gamepad/WebKitGamepad.h
@@ -0,0 +1,30 @@
+// Copyright 2014 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 WebKitGamepad_h
+#define WebKitGamepad_h
+
+#include "modules/gamepad/GamepadBase.h"
+
+namespace WebCore {
+
+class WebKitGamepad FINAL: public GamepadBase {
+public:
+ static PassRefPtrWillBeRawPtr<WebKitGamepad> create()
+ {
+ return adoptRefWillBeNoop(new WebKitGamepad);
+ }
+ virtual ~WebKitGamepad();
+
+ const FloatVector& buttons() const { return m_buttons; }
+ virtual void buttons(unsigned count, const blink::WebGamepadButton* data);
+
+private:
+ WebKitGamepad();
+ FloatVector m_buttons;
+};
+
+} // namespace WebCore
+
+#endif // WebKitGamepad_h

Powered by Google App Engine
This is Rietveld 408576698