Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Issue 2784303002: Adds button to VRShell menu mode, which lets the user manually exit WebVR presentation. (Closed)
Patch Set: Fixed closure compiler error Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
index af104f87ea807d8484f72366883393b6cf7b2f52..0c8d653e279ca6fa13430c3c38d9f5514bd0e459 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
@@ -521,19 +521,11 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener
}
@CalledByNative
- private boolean exitWebVR() {
+ private boolean exitWebVRPresent() {
if (!mInVr) return false;
mVrShell.setWebVrModeEnabled(false);
- if (mVrSupportLevel == VR_CARDBOARD) {
- // Transition screen is not available for Cardboard only (non-Daydream) devices.
- // TODO(bshe): Fix this once b/33490788 is fixed.
- shutdownVR(false /* isPausing */, false /* showTransition */);
- } else {
- // TODO(bajones): Once VR Shell can be invoked outside of WebVR this
- // should no longer exit the shell outright. Need a way to determine
- // how VrShell was created.
- shutdownVR(
- false /* isPausing */, !isVrShellEnabled(mVrSupportLevel) /* showTransition */);
+ if (!isVrShellEnabled(mVrSupportLevel)) {
+ shutdownVR(false /* isPausing */, true /* showTransition */);
}
return true;
}
@@ -654,6 +646,8 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener
if (!mInVr) return;
mInVr = false;
mRequestedWebVR = false;
+ // Transition screen is not available for Cardboard only (non-Daydream) devices.
+ // TODO(bshe): Fix this once b/33490788 is fixed.
boolean transition = mVrSupportLevel == VR_DAYDREAM && showTransition;
if (!isPausing) {
if (!transition || !mVrDaydreamApi.exitFromVr(EXIT_VR_RESULT, new Intent())) {
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698