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