| Index: components/autofill/content/renderer/autofill_agent.cc
|
| diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
|
| index 6afbd4ca8dd79d0d60c860e2d41e584424cf114d..2c48d11bd60520134cfd5c5f5539c0ac1f40105e 100644
|
| --- a/components/autofill/content/renderer/autofill_agent.cc
|
| +++ b/components/autofill/content/renderer/autofill_agent.cc
|
| @@ -172,6 +172,7 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
|
| OnFillPasswordSuggestion)
|
| IPC_MESSAGE_HANDLER(AutofillMsg_PreviewPasswordSuggestion,
|
| OnPreviewPasswordSuggestion)
|
| + IPC_MESSAGE_HANDLER(AutofillMsg_PopupHidden, OnPopupHidden)
|
| IPC_MESSAGE_HANDLER(AutofillMsg_RequestAutocompleteResult,
|
| OnRequestAutocompleteResult)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| @@ -234,10 +235,6 @@ void AutofillAgent::FocusedNodeChanged(const WebNode& node) {
|
| element_ = *element;
|
| }
|
|
|
| -void AutofillAgent::Resized() {
|
| - HidePopup();
|
| -}
|
| -
|
| void AutofillAgent::didRequestAutocomplete(
|
| const WebFormElement& form) {
|
| DCHECK_EQ(form.document().frame(), render_frame()->GetWebFrame());
|
| @@ -550,6 +547,11 @@ void AutofillAgent::OnPreviewPasswordSuggestion(
|
| DCHECK(handled);
|
| }
|
|
|
| +void AutofillAgent::OnPopupHidden() {
|
| + if (!element_.isNull())
|
| + OnClearPreviewedForm();
|
| +}
|
| +
|
| void AutofillAgent::OnRequestAutocompleteResult(
|
| WebFormElement::AutocompleteResult result,
|
| const base::string16& message,
|
| @@ -740,10 +742,6 @@ void AutofillAgent::ProcessForms() {
|
| void AutofillAgent::HidePopup() {
|
| if (!is_popup_possibly_visible_)
|
| return;
|
| -
|
| - if (!element_.isNull())
|
| - OnClearPreviewedForm();
|
| -
|
| is_popup_possibly_visible_ = false;
|
| Send(new AutofillHostMsg_HidePopup(routing_id()));
|
| }
|
| @@ -785,8 +783,4 @@ void AutofillAgent::LegacyAutofillAgent::FocusedNodeChanged(
|
| agent_->FocusedNodeChanged(node);
|
| }
|
|
|
| -void AutofillAgent::LegacyAutofillAgent::Resized() {
|
| - agent_->Resized();
|
| -}
|
| -
|
| } // namespace autofill
|
|
|