| Index: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
|
| index ed916e4dbb33945f3683201ffde66724cd3a78e9..15ec7e2de68746c70f193a7ed33b49c870acb655 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
|
| @@ -38,7 +38,7 @@ import org.chromium.content_public.browser.WebContents;
|
| }
|
|
|
| @CalledByNative
|
| - private void destroy() {
|
| + private void clearNativePtr() {
|
| mNativeWebContentsAndroid = 0;
|
| mNavigationController = null;
|
| }
|
| @@ -49,6 +49,11 @@ import org.chromium.content_public.browser.WebContents;
|
| }
|
|
|
| @Override
|
| + public void destroy() {
|
| + if (mNativeWebContentsAndroid != 0) nativeDestroyWebContents(mNativeWebContentsAndroid);
|
| + }
|
| +
|
| + @Override
|
| public NavigationController getNavigationController() {
|
| return mNavigationController;
|
| }
|
| @@ -292,6 +297,9 @@ import org.chromium.content_public.browser.WebContents;
|
| callback.handleJavaScriptResult(jsonResult);
|
| }
|
|
|
| + // This is static to avoid exposing a public destroy method on the native side of this class.
|
| + private static native void nativeDestroyWebContents(long webContentsAndroidPtr);
|
| +
|
| private native String nativeGetTitle(long nativeWebContentsAndroid);
|
| private native String nativeGetVisibleURL(long nativeWebContentsAndroid);
|
| private native boolean nativeIsLoading(long nativeWebContentsAndroid);
|
|
|