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

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

Issue 170993002: Updating Blink-side WebGamepad interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Scaled back Blink changes, only contains WebGamepad interface update 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
« no previous file with comments | « no previous file | Source/modules/gamepad/Gamepad.cpp » ('j') | public/platform/WebGamepad.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/gamepad/Gamepad.h
diff --git a/Source/modules/gamepad/Gamepad.h b/Source/modules/gamepad/Gamepad.h
index 50f6b4e50d8a00451a86953760eae6fbe1d3e9ef..da7a0b6ef080c051fa09a6151dcaa5dd55a1bc22 100644
--- a/Source/modules/gamepad/Gamepad.h
+++ b/Source/modules/gamepad/Gamepad.h
@@ -28,6 +28,7 @@
#include "bindings/v8/ScriptWrappable.h"
#include "heap/Handle.h"
+#include "public/platform/WebGamepad.h"
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
@@ -51,14 +52,24 @@ public:
unsigned index() const { return m_index; }
void index(unsigned val) { m_index = val; }
+ bool connected() const { return m_connected; }
+ void connected(const bool val) { m_connected = val; }
scottmg 2014/02/20 00:59:47 nit; const bool seems odd
+
unsigned long long timestamp() const { return m_timestamp; }
void timestamp(unsigned long long val) { m_timestamp = val; }
+ const String& mapping() const { return m_mapping; }
+ void mapping(const String& val) { m_mapping = val; }
+
const FloatVector& axes() const { return m_axes; }
void axes(unsigned count, float* data);
const FloatVector& buttons() const { return m_buttons; }
+#if defined(ENABLE_NEW_GAMEPAD_API)
+ void buttons(unsigned count, blink::WebGamepadButton* data);
+#else
void buttons(unsigned count, float* data);
+#endif
void trace(Visitor*);
@@ -66,7 +77,9 @@ private:
Gamepad();
String m_id;
unsigned m_index;
+ bool m_connected;
unsigned long long m_timestamp;
+ String m_mapping;
FloatVector m_axes;
FloatVector m_buttons;
};
« no previous file with comments | « no previous file | Source/modules/gamepad/Gamepad.cpp » ('j') | public/platform/WebGamepad.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698