Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: third_party/WebKit/Source/modules/gamepad/GamepadEvent.h

Issue 2217763003: Remove Blink-WebKit-only document.createEvent strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class GamepadEvent final : public Event { 14 class GamepadEvent final : public Event {
15 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
16 public: 16 public:
17 static GamepadEvent* create()
18 {
19 return new GamepadEvent;
20 }
21 static GamepadEvent* create(const AtomicString& type, bool canBubble, bool c ancelable, Gamepad* gamepad) 17 static GamepadEvent* create(const AtomicString& type, bool canBubble, bool c ancelable, Gamepad* gamepad)
22 { 18 {
23 return new GamepadEvent(type, canBubble, cancelable, gamepad); 19 return new GamepadEvent(type, canBubble, cancelable, gamepad);
24 } 20 }
25 static GamepadEvent* create(const AtomicString& type, const GamepadEventInit & initializer) 21 static GamepadEvent* create(const AtomicString& type, const GamepadEventInit & initializer)
26 { 22 {
27 return new GamepadEvent(type, initializer); 23 return new GamepadEvent(type, initializer);
28 } 24 }
29 ~GamepadEvent() override; 25 ~GamepadEvent() override;
30 26
31 Gamepad* getGamepad() const { return m_gamepad.get(); } 27 Gamepad* getGamepad() const { return m_gamepad.get(); }
32 28
33 const AtomicString& interfaceName() const override; 29 const AtomicString& interfaceName() const override;
34 30
35 DECLARE_VIRTUAL_TRACE(); 31 DECLARE_VIRTUAL_TRACE();
36 32
37 private: 33 private:
38 GamepadEvent();
39 GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, Game pad*); 34 GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, Game pad*);
40 GamepadEvent(const AtomicString&, const GamepadEventInit&); 35 GamepadEvent(const AtomicString&, const GamepadEventInit&);
41 36
42 Member<Gamepad> m_gamepad; 37 Member<Gamepad> m_gamepad;
43 }; 38 };
44 39
45 } // namespace blink 40 } // namespace blink
46 41
47 #endif // GamepadEvent_h 42 #endif // GamepadEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698