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

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

Issue 2540103004: Disable WebVR presentation for Cardboard viewers. (Closed)
Patch Set: Created 4 years 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 | « chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApiImpl.java ('k') | 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 9a684e0634d81285e88cd5e6dddd90abd54a2c9a..c9de3369a951d7e2375507a007dd5dafc6b22abb 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
@@ -218,20 +218,23 @@ public class VrShellDelegate {
if (tab == null || tab.getContentViewCore() == null) {
return false;
}
-
// For now we don't handle native pages. crbug.com/661609
if (tab.getNativePage() != null || tab.isShowingSadTab()) {
return false;
}
+ // crbug.com/667781
+ if (MultiWindowUtils.getInstance().isInMultiWindowMode(mActivity)) {
+ return false;
+ }
+ // crbug.com/667908
+ if (!mVrDaydreamApi.isDaydreamCurrentViewer()) {
+ return false;
+ }
return true;
}
@CalledByNative
private void presentRequested(boolean inWebVR) {
- 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.
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApiImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698