Index: android_webview/java/src/org/chromium/android_webview/AwAutofillClient.java |
diff --git a/android_webview/java/src/org/chromium/android_webview/AwAutofillClient.java b/android_webview/java/src/org/chromium/android_webview/AwAutofillClient.java |
index 172c2b384f03a6bb2115075cda180d040e5b34fb..2c7e3bc73efc31d5e531675d98aeaa91e5d28036 100644 |
--- a/android_webview/java/src/org/chromium/android_webview/AwAutofillClient.java |
+++ b/android_webview/java/src/org/chromium/android_webview/AwAutofillClient.java |
@@ -4,6 +4,7 @@ |
package org.chromium.android_webview; |
+import android.view.View; |
import android.view.ViewGroup; |
import org.chromium.base.annotations.CalledByNative; |
@@ -41,18 +42,21 @@ public class AwAutofillClient { |
} |
@CalledByNative |
- private void showAutofillPopup(float x, float y, float width, float height, |
- boolean isRtl, AutofillSuggestion[] suggestions) { |
+ private void showAutofillPopup(View anchorView, float width, boolean isRtl, |
+ AutofillSuggestion[] suggestions) { |
if (mContentViewCore == null) return; |
if (mAutofillPopup == null) { |
mAutofillPopup = new AutofillPopup( |
mContentViewCore.getContext(), |
- mContentViewCore.getViewAndroidDelegate(), |
+ anchorView, |
+ width, |
new AutofillDelegate() { |
@Override |
- public void dismissed() { } |
+ public void dismissed() { |
+ nativeDismissed(mNativeAwAutofillClient); |
+ } |
@Override |
public void suggestionSelected(int listIndex) { |
nativeSuggestionSelected(mNativeAwAutofillClient, listIndex); |
@@ -61,7 +65,6 @@ public class AwAutofillClient { |
public void deleteSuggestion(int listIndex) { } |
}); |
} |
- mAutofillPopup.setAnchorRect(x, y, width, height); |
mAutofillPopup.filterAndShow(suggestions, isRtl); |
} |
@@ -91,6 +94,7 @@ public class AwAutofillClient { |
new AutofillSuggestion(name, label, DropdownItem.NO_ICON, uniqueId, false, false); |
} |
+ private native void nativeDismissed(long nativeAwAutofillClient); |
private native void nativeSuggestionSelected(long nativeAwAutofillClient, |
int position); |
} |