Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
index 667a566b79e8d89d07e3a0c25d792f140f8741b4..6cd16eef6c078ec5e73e3ceb8ed89ae4a83f5fd4 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopup.java |
@@ -58,9 +58,9 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem |
*/ |
public interface AutofillPopupDelegate { |
/** |
- * Confirms the dismissal of the java AutofillPopup object. |
+ * Requests the controller to hide AutofillPopup. |
*/ |
- public void dismissed(); |
+ public void requestHide(); |
/** |
* Handles the selection of an Autofill suggestion from an AutofillPopup. |
@@ -175,14 +175,21 @@ public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem |
mAnchorView.setSize(mAnchorRect, getDesiredWidth(suggestions)); |
} |
+ |
/** |
- * Dismisses the popup and calls to mAutofillCallback.dismissed(). |
+ * Overrides the default dismiss behavior to request the controller to dismiss the view. |
*/ |
@Override |
public void dismiss() { |
+ mAutofillCallback.requestHide(); |
+ } |
+ |
+ /** |
+ * Hides the popup and removes the anchor view from the ContainerView. |
+ */ |
+ public void hide() { |
super.dismiss(); |
mContainerViewDelegate.removeViewFromContainerView(mAnchorView); |
- mAutofillCallback.dismissed(); |
} |
/** |