Commit e845de42 authored by Jacob DeWitt's avatar Jacob DeWitt Committed by Commit Bot

Change 'grip' to 'squeeze' for XRInputSource.profiles

This makes the values up to date with the webxr-input-profiles registry
values as https://github.com/immersive-web/webxr-input-profiles/pull/91
has been completed.

Bug: 992631
Change-Id: I98677777d47710a83fbd91ad56bda6017134af9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816731
Auto-Submit: Jacob DeWitt <jacde@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698918}
parent 3329fdba
...@@ -557,8 +557,8 @@ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest, ...@@ -557,8 +557,8 @@ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest,
// only supports that type of controller and fills in default values if // only supports that type of controller and fills in default values if
// those inputs don't exist. // those inputs don't exist.
VerifyInputSourceProfilesArray( VerifyInputSourceProfilesArray(
t, t, {"windows-mixed-reality",
{"windows-mixed-reality", "generic-trigger-grip-touchpad-thumbstick"}); "generic-trigger-squeeze-touchpad-thumbstick"});
} else if (t->GetRuntimeType() == } else if (t->GetRuntimeType() ==
XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR) { XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR) {
VerifyInputSourceProfilesArray( VerifyInputSourceProfilesArray(
...@@ -633,8 +633,8 @@ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest, ...@@ -633,8 +633,8 @@ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest,
// only supports that type of controller and fills in default values if // only supports that type of controller and fills in default values if
// those inputs don't exist. // those inputs don't exist.
VerifyInputSourceProfilesArray( VerifyInputSourceProfilesArray(
t, t, {"windows-mixed-reality",
{"windows-mixed-reality", "generic-trigger-grip-touchpad-thumbstick"}); "generic-trigger-squeeze-touchpad-thumbstick"});
} else if (t->GetRuntimeType() == } else if (t->GetRuntimeType() ==
XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR) { XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR) {
VerifyInputSourceProfilesArray( VerifyInputSourceProfilesArray(
...@@ -738,13 +738,13 @@ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest, ...@@ -738,13 +738,13 @@ IN_PROC_MULTI_CLASS_BROWSER_TEST_F2(WebXrVrOpenVrBrowserTest,
// only supports that type of controller and fills in default values if // only supports that type of controller and fills in default values if
// those inputs don't exist. // those inputs don't exist.
VerifyInputSourceProfilesArray( VerifyInputSourceProfilesArray(
t, t, {"windows-mixed-reality",
{"windows-mixed-reality", "generic-trigger-grip-touchpad-thumbstick"}); "generic-trigger-squeeze-touchpad-thumbstick"});
} else if (t->GetRuntimeType() == } else if (t->GetRuntimeType() ==
XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR) { XrBrowserTestBase::RuntimeType::RUNTIME_OPENVR) {
VerifyInputSourceProfilesArray( VerifyInputSourceProfilesArray(
t, t, {"test-value-test-value",
{"test-value-test-value", "generic-trigger-grip-touchpad-thumbstick"}); "generic-trigger-squeeze-touchpad-thumbstick"});
} }
t->RunJavaScriptOrFail("done()"); t->RunJavaScriptOrFail("done()");
...@@ -903,7 +903,7 @@ IN_PROC_BROWSER_TEST_F(WebXrVrOpenVrBrowserTest, TestGamepadOptionalData) { ...@@ -903,7 +903,7 @@ IN_PROC_BROWSER_TEST_F(WebXrVrOpenVrBrowserTest, TestGamepadOptionalData) {
PollJavaScriptBooleanOrFail("isButtonCountEqualTo(3)", kPollTimeoutShort); PollJavaScriptBooleanOrFail("isButtonCountEqualTo(3)", kPollTimeoutShort);
VerifyInputSourceProfilesArray( VerifyInputSourceProfilesArray(
this, {"test-value-test-value", "generic-trigger-grip-touchpad"}); this, {"test-value-test-value", "generic-trigger-squeeze-touchpad"});
RunJavaScriptOrFail("done()"); RunJavaScriptOrFail("done()");
EndTest(); EndTest();
......
...@@ -368,7 +368,7 @@ device::mojom::XRInputSourceStatePtr OculusRenderLoop::GetTouchData( ...@@ -368,7 +368,7 @@ device::mojom::XRInputSourceStatePtr OculusRenderLoop::GetTouchData(
// The absence of "touchpad" in this string indicates that the slots in the // The absence of "touchpad" in this string indicates that the slots in the
// button and axes arrays are placeholders required by the xr-standard mapping // button and axes arrays are placeholders required by the xr-standard mapping
// but not actually updated with any input. // but not actually updated with any input.
desc->profiles.push_back("generic-trigger-grip-thumbstick"); desc->profiles.push_back("generic-trigger-squeeze-thumbstick");
state->description = std::move(desc); state->description = std::move(desc);
......
...@@ -355,7 +355,7 @@ class OpenVRGamepadBuilder : public XRStandardGamepadBuilder { ...@@ -355,7 +355,7 @@ class OpenVRGamepadBuilder : public XRStandardGamepadBuilder {
// trigger if we get here. // trigger if we get here.
std::string capabilities = "generic-trigger"; std::string capabilities = "generic-trigger";
if (HasSecondaryButton()) { if (HasSecondaryButton()) {
capabilities += "-grip"; capabilities += "-squeeze";
} }
if (HasTouchpad()) { if (HasTouchpad()) {
capabilities += "-touchpad"; capabilities += "-touchpad";
......
...@@ -575,7 +575,8 @@ ParsedInputState MixedRealityInputHelper::ParseWindowsSourceState( ...@@ -575,7 +575,8 @@ ParsedInputState MixedRealityInputHelper::ParseWindowsSourceState(
// This makes it clear that the controller actually has a grip button and // This makes it clear that the controller actually has a grip button and
// touchpad and thumbstick input. Otherwise, it's ambiguous whether slots // touchpad and thumbstick input. Otherwise, it's ambiguous whether slots
// like the touchpad buttons + axes are hooked up vs just placeholders. // like the touchpad buttons + axes are hooked up vs just placeholders.
description->profiles.push_back("generic-trigger-grip-touchpad-thumbstick"); description->profiles.push_back(
"generic-trigger-squeeze-touchpad-thumbstick");
source_state->gamepad = GetWebXRGamepad(input_state); source_state->gamepad = GetWebXRGamepad(input_state);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment