| Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShell.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShell.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShell.java
|
| index 5bd25a049d9809f6421f229ba533fa707e5ae5b5..2f0957e28f79728d8512a8a78235acfa39ad1811 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShell.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShell.java
|
| @@ -103,7 +103,7 @@ public class VrShell extends GvrLayout implements GLSurfaceView.Renderer, VrShel
|
| }
|
|
|
| @Override
|
| - public void onNativeLibraryReady(Tab currentTab) {
|
| + public void initializeNative(Tab currentTab, VrShellDelegate delegate) {
|
| assert currentTab.getContentViewCore() != null;
|
| mTab = currentTab;
|
| mCVC = mTab.getContentViewCore();
|
| @@ -112,6 +112,8 @@ public class VrShell extends GvrLayout implements GLSurfaceView.Renderer, VrShel
|
| mNativeVrShell = nativeInit(mCVC.getWebContents(),
|
| mVRWindowAndroid.getNativePointer());
|
|
|
| + nativeSetDelegate(mNativeVrShell, delegate);
|
| +
|
| reparentContentWindow();
|
|
|
| nativeUpdateCompositorLayers(mNativeVrShell);
|
| @@ -266,6 +268,11 @@ public class VrShell extends GvrLayout implements GLSurfaceView.Renderer, VrShel
|
| }
|
|
|
| @Override
|
| + public void setWebVrModeEnabled(boolean enabled) {
|
| + nativeSetWebVrMode(mNativeVrShell, enabled);
|
| + }
|
| +
|
| + @Override
|
| public boolean onTouchEvent(MotionEvent event) {
|
| return true;
|
| }
|
| @@ -294,24 +301,17 @@ public class VrShell extends GvrLayout implements GLSurfaceView.Renderer, VrShel
|
|
|
| private native long nativeInit(WebContents contentWebContents,
|
| long nativeContentWindowAndroid);
|
| -
|
| + private native void nativeSetDelegate(long nativeVrShell, VrShellDelegate delegate);
|
| private native void nativeGvrInit(long nativeVrShell, long nativeGvrApi);
|
| -
|
| private native void nativeDestroy(long nativeVrShell);
|
| -
|
| private native void nativeInitializeGl(
|
| long nativeVrShell, int contentDataHandle);
|
| -
|
| private native void nativeDrawFrame(long nativeVrShell);
|
| -
|
| private native void nativeOnPause(long nativeVrShell);
|
| -
|
| private native void nativeOnResume(long nativeVrShell);
|
| -
|
| private native void nativeContentSurfaceDestroyed(long nativeVrShell);
|
| -
|
| private native void nativeContentSurfaceChanged(
|
| long nativeVrShell, int width, int height, Surface surface);
|
| -
|
| private native void nativeUpdateCompositorLayers(long nativeVrShell);
|
| + private native void nativeSetWebVrMode(long nativeVrShell, boolean enabled);
|
| }
|
|
|