1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "config.h"
6#include "modules/gamepad/GamepadEvent.h"
7
8namespace WebCore {
9
10GamepadEventInit::GamepadEventInit()
11{
12}
13
14GamepadEvent::GamepadEvent()
15{
16    ScriptWrappable::init(this);
17}
18
19GamepadEvent::GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, Gamepad* gamepad)
20    : Event(type, canBubble, cancelable)
21    , m_gamepad(gamepad)
22{
23    ScriptWrappable::init(this);
24}
25
26GamepadEvent::GamepadEvent(const AtomicString& type, const GamepadEventInit& initializer)
27    : Event(type, initializer)
28    , m_gamepad(initializer.gamepad)
29{
30    ScriptWrappable::init(this);
31}
32
33GamepadEvent::~GamepadEvent()
34{
35}
36
37const AtomicString& GamepadEvent::interfaceName() const
38{
39    return EventNames::GamepadEvent;
40}
41
42void GamepadEvent::trace(Visitor* visitor)
43{
44    visitor->trace(m_gamepad);
45    Event::trace(visitor);
46}
47
48} // namespace WebCore
49