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 #ifndef GamepadEvent_h | 5 #ifndef GamepadEvent_h |
6 #define GamepadEvent_h | 6 #define GamepadEvent_h |
7 | 7 |
8 #include "modules/EventModules.h" | 8 #include "modules/EventModules.h" |
9 #include "modules/gamepad/Gamepad.h" | 9 #include "modules/gamepad/Gamepad.h" |
10 #include "modules/gamepad/GamepadEventInit.h" | 10 #include "modules/gamepad/GamepadEventInit.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 static PassRefPtrWillBeRawPtr<GamepadEvent> create(const AtomicString& type,
bool canBubble, bool cancelable, Gamepad* gamepad) | 21 static PassRefPtrWillBeRawPtr<GamepadEvent> create(const AtomicString& type,
bool canBubble, bool cancelable, Gamepad* gamepad) |
22 { | 22 { |
23 return adoptRefWillBeNoop(new GamepadEvent(type, canBubble, cancelable,
gamepad)); | 23 return adoptRefWillBeNoop(new GamepadEvent(type, canBubble, cancelable,
gamepad)); |
24 } | 24 } |
25 static PassRefPtrWillBeRawPtr<GamepadEvent> create(const AtomicString& type,
const GamepadEventInit& initializer) | 25 static PassRefPtrWillBeRawPtr<GamepadEvent> create(const AtomicString& type,
const GamepadEventInit& initializer) |
26 { | 26 { |
27 return adoptRefWillBeNoop(new GamepadEvent(type, initializer)); | 27 return adoptRefWillBeNoop(new GamepadEvent(type, initializer)); |
28 } | 28 } |
29 ~GamepadEvent() override; | 29 ~GamepadEvent() override; |
30 | 30 |
31 Gamepad* gamepad() const { return m_gamepad.get(); } | 31 Gamepad* getGamepad() const { return m_gamepad.get(); } |
32 | 32 |
33 const AtomicString& interfaceName() const override; | 33 const AtomicString& interfaceName() const override; |
34 | 34 |
35 DECLARE_VIRTUAL_TRACE(); | 35 DECLARE_VIRTUAL_TRACE(); |
36 | 36 |
37 private: | 37 private: |
38 GamepadEvent(); | 38 GamepadEvent(); |
39 GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, Game
pad*); | 39 GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, Game
pad*); |
40 GamepadEvent(const AtomicString&, const GamepadEventInit&); | 40 GamepadEvent(const AtomicString&, const GamepadEventInit&); |
41 | 41 |
42 PersistentWillBeMember<Gamepad> m_gamepad; | 42 PersistentWillBeMember<Gamepad> m_gamepad; |
43 }; | 43 }; |
44 | 44 |
45 } // namespace blink | 45 } // namespace blink |
46 | 46 |
47 #endif // GamepadEvent_h | 47 #endif // GamepadEvent_h |
OLD | NEW |