Upstream version 10.39.225.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 blink {
9
10 GamepadEventInit::GamepadEventInit()
11 {
12 }
13
14 GamepadEvent::GamepadEvent()
15 {
16 }
17
18 GamepadEvent::GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, Gamepad* gamepad)
19     : Event(type, canBubble, cancelable)
20     , m_gamepad(gamepad)
21 {
22 }
23
24 GamepadEvent::GamepadEvent(const AtomicString& type, const GamepadEventInit& initializer)
25     : Event(type, initializer)
26     , m_gamepad(initializer.gamepad)
27 {
28 }
29
30 GamepadEvent::~GamepadEvent()
31 {
32 }
33
34 const AtomicString& GamepadEvent::interfaceName() const
35 {
36     return EventNames::GamepadEvent;
37 }
38
39 void GamepadEvent::trace(Visitor* visitor)
40 {
41     visitor->trace(m_gamepad);
42     Event::trace(visitor);
43 }
44
45 } // namespace blink