Index: Source/modules/gamepad/GamepadList.h |
diff --git a/Source/modules/gamepad/GamepadList.h b/Source/modules/gamepad/GamepadList.h |
index 78c7e75a5e1e3fcdb79e0543b58c76d1988d5191..b19e6afc5c042d2e2ff471da76bf39ceb9734733 100644 |
--- a/Source/modules/gamepad/GamepadList.h |
+++ b/Source/modules/gamepad/GamepadList.h |
@@ -29,13 +29,14 @@ |
#include "bindings/v8/ScriptWrappable.h" |
#include "heap/Handle.h" |
#include "modules/gamepad/Gamepad.h" |
+#include "public/platform/WebGamepads.h" |
#include "wtf/PassRefPtr.h" |
#include "wtf/RefCounted.h" |
#include "wtf/Vector.h" |
namespace WebCore { |
-class GamepadList : public RefCountedWillBeGarbageCollected<GamepadList>, public ScriptWrappable { |
+class GamepadList : public RefCountedWillBeGarbageCollectedFinalized<GamepadList>, public ScriptWrappable { |
public: |
static PassRefPtrWillBeRawPtr<GamepadList> create() { return adoptRefWillBeNoop(new GamepadList); } |
~GamepadList(); |
@@ -47,13 +48,12 @@ public: |
void trace(Visitor*); |
private: |
- enum { kMaximumGamepads = 4 }; |
GamepadList() |
{ |
ScriptWrappable::init(this); |
} |
- RefPtrWillBeMember<Gamepad> m_items[kMaximumGamepads]; |
+ RefPtrWillBeMember<Gamepad> m_items[blink::WebGamepads::itemsLengthCap]; |
}; |
} // namespace WebCore |