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

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

Issue 183313003: Added non-prefixed navigator.getGamepads() with updated API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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
« no previous file with comments | « Source/modules/gamepad/GamepadList.h ('k') | Source/modules/gamepad/GamepadList.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/gamepad/GamepadList.cpp
diff --git a/Source/modules/gamepad/GamepadList.cpp b/Source/modules/gamepad/GamepadList.cpp
index 86a57d2f1c22b6bcd527cf9fac1279f757a0a01d..cc29a73dbbddb90c0752ee0f7d3cb8edc4f7e3c5 100644
--- a/Source/modules/gamepad/GamepadList.cpp
+++ b/Source/modules/gamepad/GamepadList.cpp
@@ -34,14 +34,14 @@ GamepadList::~GamepadList()
void GamepadList::set(unsigned index, PassRefPtrWillBeRawPtr<Gamepad> gamepad)
{
- if (index >= kMaximumGamepads)
+ if (index >= blink::WebGamepads::itemsLengthCap)
return;
m_items[index] = gamepad;
}
unsigned GamepadList::length() const
{
- return kMaximumGamepads;
+ return blink::WebGamepads::itemsLengthCap;
}
Gamepad* GamepadList::item(unsigned index)
@@ -51,7 +51,7 @@ Gamepad* GamepadList::item(unsigned index)
void GamepadList::trace(Visitor* visitor)
{
- for (unsigned index = 0; index < kMaximumGamepads; index++) {
+ for (unsigned index = 0; index < blink::WebGamepads::itemsLengthCap; index++) {
visitor->trace(m_items[index]);
}
}
« no previous file with comments | « Source/modules/gamepad/GamepadList.h ('k') | Source/modules/gamepad/GamepadList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698