Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / gamepad / GamepadEvent.cpp
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
8 namespace WebCore {
9
10 GamepadEventInit::GamepadEventInit()
11 {
12 }
13
14 GamepadEvent::GamepadEvent()
15 {
16     ScriptWrappable::init(this);
17 }
18
19 GamepadEvent::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
26 GamepadEvent::GamepadEvent(const AtomicString& type, const GamepadEventInit& initializer)
27     : Event(type, initializer)
28     , m_gamepad(initializer.gamepad)
29 {
30     ScriptWrappable::init(this);
31 }
32
33 GamepadEvent::~GamepadEvent()
34 {
35 }
36
37 const AtomicString& GamepadEvent::interfaceName() const
38 {
39     return EventNames::GamepadEvent;
40 }
41
42 void GamepadEvent::trace(Visitor* visitor)
43 {
44     visitor->trace(m_gamepad);
45     Event::trace(visitor);
46 }
47
48 } // namespace WebCore