#ifndef GamepadDispatcher_h
#define GamepadDispatcher_h
-#include "core/frame/DeviceEventDispatcherBase.h"
+#include "core/frame/PlatformEventDispatcher.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebGamepad.h"
#include "public/platform/WebGamepadListener.h"
namespace blink {
-class WebGamepads;
-}
-
-namespace WebCore {
class NavigatorGamepad;
+class WebGamepads;
-class GamepadDispatcher : public DeviceEventDispatcherBase, public blink::WebGamepadListener {
+class GamepadDispatcher : public PlatformEventDispatcher, public WebGamepadListener {
public:
static GamepadDispatcher& instance();
- void sampleGamepads(blink::WebGamepads&);
+ void sampleGamepads(WebGamepads&);
struct ConnectionChange {
- blink::WebGamepad pad;
+ WebGamepad pad;
unsigned index;
};
virtual ~GamepadDispatcher();
// WebGamepadListener
- virtual void didConnectGamepad(unsigned index, const blink::WebGamepad&) OVERRIDE;
- virtual void didDisconnectGamepad(unsigned index, const blink::WebGamepad&) OVERRIDE;
+ virtual void didConnectGamepad(unsigned index, const WebGamepad&) OVERRIDE;
+ virtual void didDisconnectGamepad(unsigned index, const WebGamepad&) OVERRIDE;
- // DeviceEventDispatcherBase
+ // PlatformEventDispatcher
virtual void startListening() OVERRIDE;
virtual void stopListening() OVERRIDE;
- void dispatchDidConnectOrDisconnectGamepad(unsigned index, const blink::WebGamepad&, bool connected);
+ void dispatchDidConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool connected);
ConnectionChange m_latestChange;
};
-} // namespace WebCore
+} // namespace blink
#endif