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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 831523005: Remove most native WebContents references from Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 11 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 | android_webview/java/src/org/chromium/android_webview/AwSettings.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 70393519e174d7507f13a9d30555188818b5e2fb..22d65924bb29ae1a73fdf19b2fc800e0546ea966 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -640,13 +640,13 @@ public class AwContents implements SmartClipProvider {
}
private static ContentViewCore createAndInitializeContentViewCore(ViewGroup containerView,
- Context context, InternalAccessDelegate internalDispatcher, long nativeWebContents,
+ Context context, InternalAccessDelegate internalDispatcher, WebContents webContents,
GestureStateListener gestureStateListener,
ContentViewClient contentViewClient,
ContentViewCore.ZoomControlsDelegate zoomControlsDelegate,
WindowAndroid windowAndroid) {
ContentViewCore contentViewCore = new ContentViewCore(context);
- contentViewCore.initialize(containerView, internalDispatcher, nativeWebContents,
+ contentViewCore.initialize(containerView, internalDispatcher, webContents,
windowAndroid);
contentViewCore.addGestureStateListener(gestureStateListener);
contentViewCore.setContentViewClient(contentViewClient);
@@ -812,21 +812,21 @@ public class AwContents implements SmartClipProvider {
// bind all the native->java relationships.
mCleanupReference = new CleanupReference(this, new DestroyRunnable(mNativeAwContents));
- long nativeWebContents = nativeGetWebContents(mNativeAwContents);
+ WebContents webContents = nativeGetWebContents(mNativeAwContents);
Activity activity = ContentViewCore.activityFromContext(mContext);
mWindowAndroid = activity != null
? new ActivityWindowAndroid(activity)
: new WindowAndroid(mContext.getApplicationContext());
mContentViewCore = createAndInitializeContentViewCore(
- mContainerView, mContext, mInternalAccessAdapter, nativeWebContents,
+ mContainerView, mContext, mInternalAccessAdapter, webContents,
new AwGestureStateListener(), mContentViewClient, mZoomControls, mWindowAndroid);
nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mContentsClientBridge,
mIoThreadClient, mInterceptNavigationDelegate);
mWebContents = mContentViewCore.getWebContents();
mNavigationController = mWebContents.getNavigationController();
installWebContentsObserver();
- mSettings.setWebContents(nativeWebContents);
+ mSettings.setWebContents(webContents);
nativeSetDipScale(mNativeAwContents, (float) mDIPScale);
mContentViewCore.onShow();
}
@@ -2648,7 +2648,7 @@ public class AwContents implements SmartClipProvider {
AwContentsClientBridge contentsClientBridge,
AwContentsIoThreadClient ioThreadClient,
InterceptNavigationDelegate navigationInterceptionDelegate);
- private native long nativeGetWebContents(long nativeAwContents);
+ private native WebContents nativeGetWebContents(long nativeAwContents);
private native void nativeDocumentHasImages(long nativeAwContents, Message message);
private native void nativeGenerateMHTML(
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwSettings.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698