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

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

Issue 806993002: Removed deprecated navigator.webkitGetGamepads. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed one layout test expectations update Created 6 years 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 | « Source/core/frame/UseCounter.cpp ('k') | Source/modules/gamepad/Gamepad.cpp » ('j') | no next file with comments »
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 74882a88e87568d9e91ac063beb9887e4d777008..9ba5da265c8ed976fb8e216eca4889ada8b8e4c2 100644
--- a/Source/modules/gamepad/Gamepad.h
+++ b/Source/modules/gamepad/Gamepad.h
@@ -28,13 +28,14 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "modules/gamepad/GamepadButton.h"
-#include "modules/gamepad/GamepadCommon.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebGamepad.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
namespace blink {
-class Gamepad final : public GarbageCollectedFinalized<Gamepad>, public GamepadCommon, public ScriptWrappable {
+class Gamepad final : public GarbageCollectedFinalized<Gamepad>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
static Gamepad* create()
@@ -43,6 +44,26 @@ public:
}
~Gamepad();
+ typedef Vector<double> DoubleVector;
+
+ const String& id() const { return m_id; }
+ void setId(const String& id) { m_id = id; }
+
+ unsigned index() const { return m_index; }
+ void setIndex(unsigned val) { m_index = val; }
+
+ bool connected() const { return m_connected; }
+ void setConnected(bool val) { m_connected = val; }
+
+ unsigned long long timestamp() const { return m_timestamp; }
+ void setTimestamp(unsigned long long val) { m_timestamp = val; }
+
+ const String& mapping() const { return m_mapping; }
+ void setMapping(const String& val) { m_mapping = val; }
+
+ const DoubleVector& axes() const { return m_axes; }
+ void setAxes(unsigned count, const double* data);
+
const GamepadButtonVector& buttons() const { return m_buttons; }
void setButtons(unsigned count, const WebGamepadButton* data);
@@ -50,6 +71,13 @@ public:
private:
Gamepad();
+
+ String m_id;
+ unsigned m_index;
+ bool m_connected;
+ unsigned long long m_timestamp;
+ String m_mapping;
+ DoubleVector m_axes;
GamepadButtonVector m_buttons;
};
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/modules/gamepad/Gamepad.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698