This source file includes following definitions.
- set
- item
- trace
#include "config.h"
#include "modules/gamepad/WebKitGamepadList.h"
namespace WebCore {
WebKitGamepadList::WebKitGamepadList()
{
ScriptWrappable::init(this);
}
WebKitGamepadList::~WebKitGamepadList()
{
}
void WebKitGamepadList::set(unsigned index, PassRefPtrWillBeRawPtr<WebKitGamepad> gamepad)
{
if (index >= blink::WebGamepads::itemsLengthCap)
return;
m_items[index] = gamepad;
}
WebKitGamepad* WebKitGamepadList::item(unsigned index)
{
return index < length() ? m_items[index].get() : 0;
}
void WebKitGamepadList::trace(Visitor* visitor)
{
for (unsigned index = 0; index < blink::WebGamepads::itemsLengthCap; index++) {
visitor->trace(m_items[index]);
}
}
}