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

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

Issue 2536873002: Clean up VR Shell mode transitions (and fix potential webvr startup race). (Closed)
Patch Set: Update javascript Mode enum Created 4 years, 1 month 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
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 c9de3369a951d7e2375507a007dd5dafc6b22abb..8893c375a942cc302aaead584479c491d603a92a 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
@@ -157,10 +157,7 @@ public class VrShellDelegate {
return;
}
if (enterVR()) {
- if (mRequestedWebVR) {
- nativeSetPresentResult(mNativeVrShellDelegate, true);
- mVrShell.setWebVrModeEnabled(true);
- }
+ if (mRequestedWebVR) nativeSetPresentResult(mNativeVrShellDelegate, true);
} else {
if (mRequestedWebVR) nativeSetPresentResult(mNativeVrShellDelegate, false);
if (!mVrDaydreamApi.exitFromVr(EXIT_VR_RESULT, new Intent())) {
@@ -189,7 +186,7 @@ public class VrShellDelegate {
mTab.addObserver(mTabObserver);
addVrViews();
setupVrModeWindowFlags();
- mVrShell.initializeNative(mTab, this);
+ mVrShell.initializeNative(mTab, this, mRequestedWebVR);
mVrShell.setCloseButtonListener(new Runnable() {
@Override
public void run() {

Powered by Google App Engine
This is Rietveld 408576698