Unreviewed, fix build after r192848 and r192849
[WebKit-https.git] / Source / WebCore / Modules / gamepad / Gamepad.h
index 28ebe1a..6461aba 100644 (file)
 
 #if ENABLE(GAMEPAD)
 
 
 #if ENABLE(GAMEPAD)
 
-#include "GamepadButton.h"
-#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
+class GamepadButton;
+class PlatformGamepad;
+
 class Gamepad: public RefCounted<Gamepad> {
 public:
 class Gamepad: public RefCounted<Gamepad> {
 public:
-    static PassRefPtr<Gamepad> create()
+    static Ref<Gamepad> create(const PlatformGamepad& platformGamepad)
     {
     {
-        return adoptRef(new Gamepad);
+        return adoptRef(*new Gamepad(platformGamepad));
     }
     ~Gamepad();
 
     }
     ~Gamepad();
 
@@ -52,8 +54,10 @@ public:
     const Vector<double>& axes() const;
     const Vector<Ref<GamepadButton>>& buttons() const;
 
     const Vector<double>& axes() const;
     const Vector<Ref<GamepadButton>>& buttons() const;
 
+    void updateFromPlatformGamepad(const PlatformGamepad&);
+
 private:
 private:
-    Gamepad();
+    explicit Gamepad(const PlatformGamepad&);
     String m_id;
     unsigned m_index;
     bool m_connected;
     String m_id;
     unsigned m_index;
     bool m_connected;