Index: Source/modules/gamepad/GamepadDispatcher.h |
diff --git a/Source/modules/gamepad/GamepadDispatcher.h b/Source/modules/gamepad/GamepadDispatcher.h |
index 8ee91a024cfac4afce91f4d445dd4b2ad14a5f71..470afd165de47e6b0a9dd3daea4cd8208de50d95 100644 |
--- a/Source/modules/gamepad/GamepadDispatcher.h |
+++ b/Source/modules/gamepad/GamepadDispatcher.h |
@@ -5,11 +5,12 @@ |
#ifndef GamepadDispatcher_h |
#define GamepadDispatcher_h |
-#include "core/frame/DeviceSensorEventDispatcher.h" |
+#include "core/frame/DeviceEventDispatcherBase.h" |
+#include "platform/heap/Handle.h" |
+#include "public/platform/WebGamepad.h" |
#include "public/platform/WebGamepadListener.h" |
namespace blink { |
-class WebGamepad; |
class WebGamepads; |
} |
@@ -17,14 +18,14 @@ namespace WebCore { |
class NavigatorGamepad; |
-class GamepadDispatcher : public DeviceSensorEventDispatcher, public blink::WebGamepadListener { |
+class GamepadDispatcher : public DeviceEventDispatcherBase, public blink::WebGamepadListener { |
public: |
static GamepadDispatcher& instance(); |
- void addClient(NavigatorGamepad*); |
- void removeClient(NavigatorGamepad*); |
void sampleGamepads(blink::WebGamepads&); |
+ const blink::WebGamepad& latestGamepadEventData(unsigned& index) const; |
timvolodine
2014/06/16 13:05:17
drop the index argument here?
|
+ |
private: |
GamepadDispatcher(); |
virtual ~GamepadDispatcher(); |
@@ -35,6 +36,9 @@ private: |
virtual void startListening() OVERRIDE; |
virtual void stopListening() OVERRIDE; |
+ |
+ blink::WebGamepad m_latestGamepad; |
+ unsigned m_latestGamepadIndex; |
timvolodine
2014/06/16 13:05:17
is this needed?
|
}; |
} // namespace WebCore |