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