Commit 59c3fa3e authored by Anna Offenwanger's avatar Anna Offenwanger Committed by Commit Bot

Fixing a bug which caused the VR Headset activation to fail

Bug: 874758
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I31e474ab9736b96ed1da400dcca7206a650b87fb
Reviewed-on: https://chromium-review.googlesource.com/1178936Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Commit-Queue: Anna Offenwanger <offenwanger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583875}
parent 6c3cb423
...@@ -249,7 +249,12 @@ void XRDeviceImpl::ExitPresent() { ...@@ -249,7 +249,12 @@ void XRDeviceImpl::ExitPresent() {
void XRDeviceImpl::SetListeningForActivate( void XRDeviceImpl::SetListeningForActivate(
device::mojom::VRDisplayClientPtr client) { device::mojom::VRDisplayClientPtr client) {
client_ = std::move(client); client_ = std::move(client);
if (immersive_runtime_ && client) { if (!immersive_runtime_) {
// This function sets the runtimes.
GetCurrentVRDisplayInfo();
}
if (immersive_runtime_ && client_) {
immersive_runtime_->UpdateListeningForActivate(this); immersive_runtime_->UpdateListeningForActivate(this);
} }
} }
...@@ -265,6 +270,7 @@ void XRDeviceImpl::GetImmersiveVRDisplayInfo( ...@@ -265,6 +270,7 @@ void XRDeviceImpl::GetImmersiveVRDisplayInfo(
void XRDeviceImpl::SetInFocusedFrame(bool in_focused_frame) { void XRDeviceImpl::SetInFocusedFrame(bool in_focused_frame) {
in_focused_frame_ = in_focused_frame; in_focused_frame_ = in_focused_frame;
if (ListeningForActivate() && immersive_runtime_) { if (ListeningForActivate() && immersive_runtime_) {
// No change, except focus. // No change, except focus.
immersive_runtime_->UpdateListeningForActivate(this); immersive_runtime_->UpdateListeningForActivate(this);
......
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