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

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

Issue 183313003: Added non-prefixed navigator.getGamepads() with updated API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated UseCounter 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/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

Powered by Google App Engine
This is Rietveld 408576698