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

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

Issue 2536873002: Clean up VR Shell mode transitions (and fix potential webvr startup race). (Closed)
Patch Set: Address comments 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/VrShellImpl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
index fae9c8cca1c4a2fc7f95f68b7d5a5c00d60fdd8f..a3d53cd2f9599a776e0b892b4241eb9181af589f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
@@ -114,7 +114,7 @@ public class VrShellImpl extends GvrLayout implements GLSurfaceView.Renderer, Vr
}
@Override
- public void initializeNative(Tab currentTab, VrShellDelegate delegate) {
+ public void initializeNative(Tab currentTab, VrShellDelegate delegate, boolean forWebVR) {
assert currentTab.getContentViewCore() != null;
mTab = currentTab;
mContentCVC = mTab.getContentViewCore();
@@ -128,8 +128,8 @@ public class VrShellImpl extends GvrLayout implements GLSurfaceView.Renderer, Vr
uiContentView, mUiContents, mUiVrWindowAndroid);
mNativeVrShell = nativeInit(mContentCVC.getWebContents(),
- mContentVrWindowAndroid.getNativePointer(),
- mUiContents, mUiVrWindowAndroid.getNativePointer());
+ mContentVrWindowAndroid.getNativePointer(), mUiContents,
+ mUiVrWindowAndroid.getNativePointer(), forWebVR);
mGlSurfaceView.setOnTouchListener(new View.OnTouchListener() {
@Override
@SuppressLint("ClickableViewAccessibility")
@@ -367,7 +367,7 @@ public class VrShellImpl extends GvrLayout implements GLSurfaceView.Renderer, Vr
}
private native long nativeInit(WebContents contentWebContents, long nativeContentWindowAndroid,
- WebContents uiWebContents, long nativeUiWindowAndroid);
+ WebContents uiWebContents, long nativeUiWindowAndroid, boolean forWebVR);
private native void nativeSetDelegate(long nativeVrShell, VrShellDelegate delegate);
private native void nativeGvrInit(long nativeVrShell, long nativeGvrApi);
private native void nativeDestroy(long nativeVrShell);

Powered by Google App Engine
This is Rietveld 408576698