| 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 WebKitGamepad_h | 5 #ifndef WebKitGamepad_h |
| 6 #define WebKitGamepad_h | 6 #define WebKitGamepad_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/gamepad/GamepadCommon.h" | 9 #include "modules/gamepad/GamepadCommon.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "wtf/Vector.h" | 11 #include "wtf/Vector.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class WebKitGamepad FINAL : public GarbageCollectedFinalized<WebKitGamepad>, pub
lic GamepadCommon, public ScriptWrappable { | 15 class WebKitGamepad FINAL : public GarbageCollectedFinalized<WebKitGamepad>, pub
lic GamepadCommon, public ScriptWrappable { |
| 16 public: | 16 public: |
| 17 static WebKitGamepad* create() | 17 static WebKitGamepad* create() |
| 18 { | 18 { |
| 19 return new WebKitGamepad(); | 19 return new WebKitGamepad(); |
| 20 } | 20 } |
| 21 ~WebKitGamepad(); | 21 ~WebKitGamepad(); |
| 22 | 22 |
| 23 typedef Vector<float> FloatVector; | 23 typedef Vector<float> FloatVector; |
| 24 | 24 |
| 25 const FloatVector& buttons() const { return m_buttons; } | 25 const FloatVector& buttons() const { return m_buttons; } |
| 26 void setButtons(unsigned count, const blink::WebGamepadButton* data); | 26 void setButtons(unsigned count, const WebGamepadButton* data); |
| 27 | 27 |
| 28 void trace(Visitor*) { } | 28 void trace(Visitor*) { } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 WebKitGamepad(); | 31 WebKitGamepad(); |
| 32 FloatVector m_buttons; | 32 FloatVector m_buttons; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace blink | 35 } // namespace blink |
| 36 | 36 |
| 37 #endif // WebKitGamepad_h | 37 #endif // WebKitGamepad_h |
| OLD | NEW |