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

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

Issue 2523583004: Disable WebVR Presentation when in MultiWindow mode. (Closed)
Patch Set: 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
« 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 fdb748a1cce221ae16b84e97cdb53a0cfbb6cc16..b00b6b53d7203c407f6223a428280ccd13f4bfe3 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
@@ -24,6 +24,7 @@ import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ChromeTabbedActivity;
+import org.chromium.chrome.browser.multiwindow.MultiWindowUtils;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabObserver;
@@ -225,9 +226,13 @@ public class VrShellDelegate {
@CalledByNative
private void presentRequested(boolean inWebVR) {
- // TODO(mthiesse): There's a GVR bug where they're not calling us back with the
- // intent we ask them to when we call DaydreamApi#launchInVr. As a temporary hack,
- // remember locally that we want to enter webVR.
+ if (MultiWindowUtils.getInstance().isInMultiWindowMode(mActivity)) {
+ nativeSetPresentResult(mNativeVrShellDelegate, false);
+ return;
+ }
+ // TODO(mthiesse): There's a GVR bug where they're not calling us back with the intent we
+ // ask them to when we call DaydreamApi#launchInVr. As a temporary hack, remember locally
+ // that we want to enter webVR.
mRequestedWebVR = inWebVR;
switch (enterVRIfNecessary()) {
case ENTER_VR_NOT_NECESSARY:
« 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