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

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

Issue 831523005: Remove most native WebContents references from Java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Kept same error checking behavior for aw_contents.cc 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
Index: android_webview/java/src/org/chromium/android_webview/AwSettings.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
index d6bd5058fe729dc8b1c916761412fa92c5848edb..63636a1bcc2da6ad2d2ff936cc1b6c3475079b0f 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
@@ -19,6 +19,7 @@ import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
+import org.chromium.content_public.browser.WebContents;
/**
* Stores Android WebView specific settings that does not need to be synced to WebKit.
@@ -264,15 +265,15 @@ public class AwSettings {
}
}
- void setWebContents(long nativeWebContents) {
+ void setWebContents(WebContents webContents) {
synchronized (mAwSettingsLock) {
if (mNativeAwSettings != 0) {
nativeDestroy(mNativeAwSettings);
assert mNativeAwSettings == 0; // nativeAwSettingsGone should have been called.
}
- if (nativeWebContents != 0) {
+ if (webContents != null) {
mEventHandler.bindUiThread();
- mNativeAwSettings = nativeInit(nativeWebContents);
+ mNativeAwSettings = nativeInit(webContents);
updateEverythingLocked();
}
}
@@ -1650,7 +1651,7 @@ public class AwSettings {
}
}
- private native long nativeInit(long webContentsPtr);
+ private native long nativeInit(WebContents webContents);
private native void nativeDestroy(long nativeAwSettings);

Powered by Google App Engine
This is Rietveld 408576698