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

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

Issue 2917353004: VR: Don't unregister Daydream intent when leaving webVR page if browsing is supported. (Closed)
Patch Set: Created 3 years, 6 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 | no next file » | 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 4debec59ab4641db031e49bea713768e971c1777..27d466a996eea8e04775d78d532b83343c301780 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
@@ -880,7 +880,8 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
// mListeningForWebVrActivate for them.
if (mVrSupportLevel != VR_DAYDREAM) return;
mListeningForWebVrActivate = listening;
- if (listening && !mPaused) {
+ if (mPaused) return;
+ if (listening) {
registerDaydreamIntent(mVrDaydreamApi, mActivity);
if (mAutopresentWebVr) {
// Dispatch vrdisplayactivate so that the WebVr page can call requestPresent
@@ -890,7 +891,7 @@ public class VrShellDelegate implements ApplicationStatus.ActivityStateListener,
// UI which is suboptimal.
nativeDisplayActivate(mNativeVrShellDelegate);
}
- } else {
+ } else if (!canEnterVr(mActivity.getActivityTab())) {
unregisterDaydreamIntent(mVrDaydreamApi);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698