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

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

Issue 200783002: Gamepad API: add support for gamepadconnected and gamepaddisconnected events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: layout fix: webexposed/global-constructors-listing Created 6 years, 9 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
« no previous file with comments | « Source/modules/gamepad/GamepadDispatcher.cpp ('k') | Source/modules/gamepad/GamepadEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 #ifndef GamepadEvent_h
6 #define GamepadEvent_h
7
8 #include "core/events/Event.h"
9 #include "modules/gamepad/Gamepad.h"
10
11 namespace WebCore {
12
13 struct GamepadEventInit : public EventInit {
14 GamepadEventInit();
15
16 RefPtrWillBeMember<Gamepad> gamepad;
17 };
18
19 class GamepadEvent FINAL : public Event {
20 public:
21 static PassRefPtr<GamepadEvent> create()
22 {
23 return adoptRef(new GamepadEvent);
24 }
25 static PassRefPtr<GamepadEvent> create(const AtomicString& type, bool canBub ble, bool cancelable, PassRefPtrWillBeRawPtr<Gamepad> gamepad)
26 {
27 return adoptRef(new GamepadEvent(type, canBubble, cancelable, gamepad));
28 }
29 static PassRefPtr<GamepadEvent> create(const AtomicString& type, const Gamep adEventInit& initializer)
30 {
31 return adoptRef(new GamepadEvent(type, initializer));
32 }
33 virtual ~GamepadEvent();
34
35 Gamepad* gamepad() const { return m_gamepad.get(); }
36
37 virtual const AtomicString& interfaceName() const OVERRIDE;
38
39 virtual void trace(Visitor*) OVERRIDE;
40
41 private:
42 GamepadEvent();
43 GamepadEvent(const AtomicString& type, bool canBubble, bool cancelable, Pass RefPtrWillBeRawPtr<Gamepad>);
44 GamepadEvent(const AtomicString&, const GamepadEventInit&);
45
46 RefPtrWillBePersistent<Gamepad> m_gamepad;
47 };
48
49 } // namespace WebCore
50
51 #endif // GamepadEvent_h
OLDNEW
« no previous file with comments | « Source/modules/gamepad/GamepadDispatcher.cpp ('k') | Source/modules/gamepad/GamepadEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698