Bug 1305889 - Part 1: Move GamepadHand API to VRControllerHost; r?kip
MozReview-Commit-ID: 5Wi8p0hvgWf
--- a/gfx/vr/VRDisplayHost.cpp
+++ b/gfx/vr/VRDisplayHost.cpp
@@ -194,8 +194,20 @@ VRControllerHost::SetPose(const dom::Gam
}
const dom::GamepadPoseState&
VRControllerHost::GetPose()
{
return mPose;
}
+void
+VRControllerHost::SetHand(dom::GamepadHand aHand)
+{
+ mControllerInfo.mHand = aHand;
+}
+
+dom::GamepadHand
+VRControllerHost::GetHand()
+{
+ return mControllerInfo.mHand;
+}
+
--- a/gfx/vr/VRDisplayHost.h
+++ b/gfx/vr/VRDisplayHost.h
@@ -90,16 +90,18 @@ public:
const VRControllerInfo& GetControllerInfo() const;
void SetIndex(uint32_t aIndex);
uint32_t GetIndex();
void SetButtonPressed(uint64_t aBit);
uint64_t GetButtonPressed();
void SetPose(const dom::GamepadPoseState& aPose);
const dom::GamepadPoseState& GetPose();
+ void SetHand(dom::GamepadHand aHand);
+ dom::GamepadHand GetHand();
protected:
explicit VRControllerHost(VRDeviceType aType);
virtual ~VRControllerHost();
VRControllerInfo mControllerInfo;
// The controller index in VRControllerManager.
uint32_t mIndex;