Commit bd3a5c12 authored by tiborg's avatar tiborg Committed by Commit bot

Enters VrShell if WebVR page doesn not request present in vrdisplayactivate handler.

- Browser goes into VR Browsing Mode when the user inserts the phone into the headeset.
- Browser will then automatically go into presentation mode if page requests present in onvrdisplayactivate handler.
- In a follow-up CL, browser should tentatively go into presentation mode if page is listening for onvrdisplayactivate (and exit presentation if page does not request present).

BUG=703315

Review-Url: https://codereview.chromium.org/2850483003
Cr-Commit-Position: refs/heads/master@{#467714}
parent e52463bc
......@@ -420,10 +420,6 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
*/
private boolean enterVrAfterDon() {
if (mNativeVrShellDelegate == 0) return false;
if (mListeningForWebVrActivateBeforePause && !mRequestedWebVr) {
nativeDisplayActivate(mNativeVrShellDelegate);
return true;
}
// Normally, if the active page doesn't have a vrdisplayactivate listener, and WebVR was not
// presenting and VrShell was not enabled, the Daydream Homescreen should show after the DON
......@@ -434,6 +430,10 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
return false;
}
if (mListeningForWebVrActivateBeforePause && !mRequestedWebVr) {
nativeDisplayActivate(mNativeVrShellDelegate);
}
enterVr();
return true;
}
......
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