Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java |
index 20a422c71d2963a14300ec6a59b6f933bd124b90..2aa55b5b41c5f442b52e0b5ad27366d11d6a38f4 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java |
@@ -14,10 +14,12 @@ import android.view.View; |
import org.chromium.base.annotations.CalledByNative; |
import org.chromium.base.annotations.JNINamespace; |
import org.chromium.chrome.R; |
+import org.chromium.chrome.browser.ChromeActivity; |
import org.chromium.chrome.browser.ResourceId; |
import org.chromium.components.autofill.AutofillDelegate; |
import org.chromium.components.autofill.AutofillPopup; |
import org.chromium.components.autofill.AutofillSuggestion; |
+import org.chromium.content.browser.accessibility.BrowserAccessibilityManager; |
import org.chromium.ui.DropdownItem; |
import org.chromium.ui.base.WindowAndroid; |
@@ -30,6 +32,7 @@ public class AutofillPopupBridge implements AutofillDelegate, DialogInterface.On |
private final AutofillPopup mAutofillPopup; |
private AlertDialog mDeletionDialog; |
private final Context mContext; |
+ private BrowserAccessibilityManager mBrowserAccessibilityManager; |
public AutofillPopupBridge(View anchorView, long nativeAutofillPopupViewAndroid, |
WindowAndroid windowAndroid) { |
@@ -49,6 +52,9 @@ public class AutofillPopupBridge implements AutofillDelegate, DialogInterface.On |
} else { |
mAutofillPopup = new AutofillPopup(activity, anchorView, this); |
mContext = activity; |
+ mBrowserAccessibilityManager = ((ChromeActivity) activity) |
+ .getCurrentContentViewCore() |
+ .getBrowserAccessibilityManager(); |
} |
} |
@@ -87,6 +93,9 @@ public class AutofillPopupBridge implements AutofillDelegate, DialogInterface.On |
private void dismiss() { |
if (mAutofillPopup != null) mAutofillPopup.dismiss(); |
if (mDeletionDialog != null) mDeletionDialog.dismiss(); |
+ if (mBrowserAccessibilityManager != null) { |
+ mBrowserAccessibilityManager.onAutofillPopupDismissed(); |
+ } |
} |
/** |
@@ -105,8 +114,13 @@ public class AutofillPopupBridge implements AutofillDelegate, DialogInterface.On |
@CalledByNative |
private void show(AutofillSuggestion[] suggestions, boolean isRtl, int backgroundColor, |
int dividerColor, int dropdownItemHeight, int margin) { |
- if (mAutofillPopup != null) mAutofillPopup.filterAndShow(suggestions, isRtl, |
- backgroundColor, dividerColor, dropdownItemHeight, margin); |
+ if (mAutofillPopup != null) { |
+ mAutofillPopup.filterAndShow( |
+ suggestions, isRtl, backgroundColor, dividerColor, dropdownItemHeight, margin); |
+ if (mBrowserAccessibilityManager != null) { |
+ mBrowserAccessibilityManager.onAutofillPopupDisplayed(mAutofillPopup.getListView()); |
+ } |
+ } |
} |
@CalledByNative |