| Index: ui/android/java/src/org/chromium/ui/base/ViewRoot.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/base/ViewRoot.java b/ui/android/java/src/org/chromium/ui/base/ViewRoot.java
|
| index c224e8e3ed8c9cdfd31b3ed2e783e090ea42a4e7..e4ac856a6b74c0cc035ac6969311710fc4a84148 100644
|
| --- a/ui/android/java/src/org/chromium/ui/base/ViewRoot.java
|
| +++ b/ui/android/java/src/org/chromium/ui/base/ViewRoot.java
|
| @@ -20,13 +20,12 @@ public class ViewRoot {
|
| // the native instance is alive.
|
| private long mNativeView;
|
|
|
| - @CalledByNative
|
| - private static ViewRoot create(long nativeView) {
|
| - return new ViewRoot(nativeView);
|
| + public static ViewRoot create(WindowAndroid window) {
|
| + return new ViewRoot(window);
|
| }
|
|
|
| - private ViewRoot(long nativeView) {
|
| - mNativeView = nativeView;
|
| + private ViewRoot(WindowAndroid window) {
|
| + mNativeView = nativeInit(window.getNativePointer());
|
| }
|
|
|
| /**
|
| @@ -41,10 +40,16 @@ public class ViewRoot {
|
| }
|
|
|
| @CalledByNative
|
| + private long getNativePtr() {
|
| + return mNativeView;
|
| + }
|
| +
|
| + @CalledByNative
|
| private void onDestroyNativeView() {
|
| mNativeView = 0;
|
| }
|
|
|
| - private static native void nativeOnPhysicalBackingSizeChanged(long viewAndroid,
|
| + private native long nativeInit(long windowNativePointer);
|
| + private native void nativeOnPhysicalBackingSizeChanged(long nativeViewRoot,
|
| int width, int height);
|
| }
|
|
|