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 GamepadDispatcher_h | 5 #ifndef GamepadDispatcher_h |
6 #define GamepadDispatcher_h | 6 #define GamepadDispatcher_h |
7 | 7 |
8 #include "core/frame/PlatformEventDispatcher.h" | 8 #include "core/frame/PlatformEventDispatcher.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 #include "public/platform/WebGamepad.h" | 10 #include "public/platform/WebGamepad.h" |
11 #include "public/platform/WebGamepadListener.h" | 11 #include "public/platform/WebGamepadListener.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class NavigatorGamepad; | |
16 class WebGamepads; | 15 class WebGamepads; |
17 | 16 |
18 class GamepadDispatcher final : public GarbageCollectedFinalized<GamepadDispatch
er>, public PlatformEventDispatcher, public WebGamepadListener { | 17 class GamepadDispatcher final : public GarbageCollectedFinalized<GamepadDispatch
er>, public PlatformEventDispatcher, public WebGamepadListener { |
19 USING_GARBAGE_COLLECTED_MIXIN(GamepadDispatcher); | 18 USING_GARBAGE_COLLECTED_MIXIN(GamepadDispatcher); |
20 public: | 19 public: |
21 static GamepadDispatcher& instance(); | 20 static GamepadDispatcher& instance(); |
22 virtual ~GamepadDispatcher(); | 21 virtual ~GamepadDispatcher(); |
23 | 22 |
24 void sampleGamepads(WebGamepads&); | 23 void sampleGamepads(WebGamepads&); |
25 | 24 |
(...skipping 18 matching lines...) Expand all Loading... |
44 virtual void stopListening() override; | 43 virtual void stopListening() override; |
45 | 44 |
46 void dispatchDidConnectOrDisconnectGamepad(unsigned index, const WebGamepad&
, bool connected); | 45 void dispatchDidConnectOrDisconnectGamepad(unsigned index, const WebGamepad&
, bool connected); |
47 | 46 |
48 ConnectionChange m_latestChange; | 47 ConnectionChange m_latestChange; |
49 }; | 48 }; |
50 | 49 |
51 } // namespace blink | 50 } // namespace blink |
52 | 51 |
53 #endif | 52 #endif |
OLD | NEW |