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

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: Added LayoutTests Created 6 years, 9 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 {
eseidel 2014/03/06 01:56:16 I'm not even sure we need to use two classes to im
Nils Barth (inactive) 2014/03/06 02:14:33 You can haz 2 IDL files with t3h same kla55: inter
bajones 2014/03/06 18:52:25 I would very much like to do this as it seems much
+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);
Inactive 2014/03/06 02:54:00 OVERRIDE
+
+private:
+ WebKitGamepad();
+ FloatVector m_buttons;
+};
+
+} // namespace WebCore
+
+#endif // WebKitGamepad_h

Powered by Google App Engine
This is Rietveld 408576698