Index: third_party/WebKit/Source/modules/gamepad/Gamepad.cpp |
diff --git a/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp b/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp |
index b0c16b7db7ea6b36fa8cc1a0ba5f4838e9d4deec..da4bab80d07836afe2ea546a6013129f320e9a3b 100644 |
--- a/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp |
+++ b/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp |
@@ -72,6 +72,21 @@ void Gamepad::setPose(const WebGamepadPose& pose) |
m_pose->setPose(pose); |
} |
+void Gamepad::setHand(const WebGamepadHand& hand) |
+{ |
+ switch (hand) { |
+ case GamepadHandNone: |
+ m_hand = ""; |
+ break; |
+ case GamepadHandLeft: |
+ m_hand = "left"; |
+ break; |
+ case GamepadHandRight: |
+ m_hand = "right"; |
+ break; |
haraken
2016/09/19 23:55:13
Add default: NOTREACHED().
|
+ } |
+} |
+ |
DEFINE_TRACE(Gamepad) |
{ |
visitor->trace(m_buttons); |