| 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..74a78c905cadc64526ac4d4b621ade5a3dbf656b 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,20 @@ public class AwAutofillClient {
|
| }
|
|
|
| @CalledByNative
|
| - private void showAutofillPopup(float x, float y, float width, float height,
|
| - boolean isRtl, AutofillSuggestion[] suggestions) {
|
| + private void showAutofillPopup(View anchorView, boolean isRtl,
|
| + AutofillSuggestion[] suggestions) {
|
|
|
| if (mContentViewCore == null) return;
|
|
|
| if (mAutofillPopup == null) {
|
| mAutofillPopup = new AutofillPopup(
|
| mContentViewCore.getContext(),
|
| - mContentViewCore.getViewAndroidDelegate(),
|
| + anchorView,
|
| new AutofillDelegate() {
|
| @Override
|
| - public void dismissed() { }
|
| + public void dismissed() {
|
| + nativeDismissed(mNativeAwAutofillClient);
|
| + }
|
| @Override
|
| public void suggestionSelected(int listIndex) {
|
| nativeSuggestionSelected(mNativeAwAutofillClient, listIndex);
|
| @@ -61,7 +64,6 @@ public class AwAutofillClient {
|
| public void deleteSuggestion(int listIndex) { }
|
| });
|
| }
|
| - mAutofillPopup.setAnchorRect(x, y, width, height);
|
| mAutofillPopup.filterAndShow(suggestions, isRtl);
|
| }
|
|
|
| @@ -91,6 +93,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);
|
| }
|
|
|