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

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

Issue 16212007: Implement the autofill UI for chromium powered android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue15097004
Patch Set: introduced java peer to AwAutofillManagerDelegate Created 7 years, 6 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/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 4b8979830e93c42e30235ba95981be6a00e000dc..1f7eb2384d4b0a6ccb5bcf43cf48ec02afd0ffe2 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -140,6 +140,8 @@ public class AwContents {
private boolean mContainerViewFocused;
private boolean mWindowFocused;
+ private AwAutofillManagerDelegate mAwAutofillManagerDelegate;
+
private static final class DestroyRunnable implements Runnable {
private int mNativeAwContents;
private DestroyRunnable(int nativeAwContents) {
@@ -1242,6 +1244,16 @@ public class AwContents {
return mContentViewCore.performAccessibilityAction(action, arguments);
}
+ /**
+ * This is a poorly named method whose intent is to hide the popup window. The name is kept
+ * for historical reasons.
+ * @see android.webkit.WebView#clearFormData()
+ */
+ public void clearFormData() {
benm (inactive) 2013/06/17 17:23:17 Going back on my previous comment: perhaps we can
sgurun-gerrit only 2013/06/25 02:44:32 Done.
+ if (mAwAutofillManagerDelegate != null)
+ mAwAutofillManagerDelegate.hideAutofillPopup();
+ }
+
//--------------------------------------------------------------------------------------------
// Methods called from native via JNI
//--------------------------------------------------------------------------------------------
@@ -1369,6 +1381,12 @@ public class AwContents {
mLayoutSizer.onPageScaleChanged(pageScaleFactor);
}
+ @CalledByNative
+ private void setAwAutofillManagerDelegate(AwAutofillManagerDelegate delegate) {
+ mAwAutofillManagerDelegate = delegate;
benm (inactive) 2013/06/17 17:23:17 nit extra space before =
sgurun-gerrit only 2013/06/25 02:44:32 Done.
+ delegate.init(mContentViewCore, mDIPScale);
+ }
+
// -------------------------------------------------------------------------------------------
// Helper methods
// -------------------------------------------------------------------------------------------
@@ -1481,4 +1499,5 @@ public class AwContents {
private native void nativeInvokeGeolocationCallback(
int nativeAwContents, boolean value, String requestingFrame);
+
benm (inactive) 2013/06/17 17:23:17 remove?
sgurun-gerrit only 2013/06/25 02:44:32 Done.
}

Powered by Google App Engine
This is Rietveld 408576698