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

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

Issue 2701523008: Intercept WebVR api calls and check for VrCore compatibility. (Closed)
Patch Set: Created 3 years, 10 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/browser/android/vr_shell/vr_shell_delegate.cc » ('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 6e60819c95909388087e3c435fdb7c5970a18061..49abc277ec7eb46835f47754142db676930f916a 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
@@ -159,9 +159,9 @@ public class VrShellDelegate {
* can be initialized.
*/
public void onNativeLibraryReady() {
+ mNativeVrShellDelegate = nativeInit();
updateVrSupportLevel();
if (mVrSupportLevel == VR_NOT_AVAILABLE) return;
mthiesse 2017/02/21 15:56:18 What if we added a new VrSupportLevel for VR_DAYDR
amp 2017/02/21 19:50:03 Aside from limiting the creation of thenative VrSh
mthiesse 2017/02/21 20:23:00 Well one concern with this change is that now we'r
amp 2017/02/21 22:15:09 I don't think we do, at least not that I'm aware o
ddorwin 2017/02/23 23:23:32 I think something like `VR_[SDK_]NEEDS_UPDATE` wou
amp 2017/02/24 01:20:01 I think we can update the VR_SUPPORT_LEVEL to incl
- mNativeVrShellDelegate = nativeInit();
Choreographer choreographer = Choreographer.getInstance();
choreographer.postFrameCallback(new FrameCallback() {
@Override
@@ -532,6 +532,10 @@ public class VrShellDelegate {
mActivity.getFullscreenManager().setPositionsForTabToNonFullscreen();
}
+ /**
+ * @return Whether VrCore exists and is up to date.
+ */
+ @CalledByNative
mthiesse 2017/02/21 15:56:18 I think you would want to check for the support le
amp 2017/02/21 19:50:03 I could wire it up to be a bit more specific. I'm
mthiesse 2017/02/21 20:23:00 I don't follow what a WebVR API Observer would loo
amp 2017/02/21 22:15:09 See comment above on not initializing native vr de
ddorwin 2017/02/23 23:23:31 My understanding of https://bugs.chromium.org/p/ch
amp 2017/02/24 01:20:01 Ok. I'll wait for the underlying lazy init parts
private boolean isVrCoreCompatible() {
assert mVrClassesWrapper != null;
if (mVrCoreVersionChecker == null) {
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698