| Index: components/autofill/content/renderer/password_autofill_agent.cc
|
| diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
|
| index d59aeefe9761283cca12ef84d1080f9a578a23ac..c6b316c36781b260dbd2a8a0beace319a6abaa4f 100644
|
| --- a/components/autofill/content/renderer/password_autofill_agent.cc
|
| +++ b/components/autofill/content/renderer/password_autofill_agent.cc
|
| @@ -381,6 +381,8 @@ bool PasswordAutofillAgent::OnMessageReceived(const IPC::Message& message) {
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(PasswordAutofillAgent, message)
|
| IPC_MESSAGE_HANDLER(AutofillMsg_FillPasswordForm, OnFillPasswordForm)
|
| + IPC_MESSAGE_HANDLER(AutofillMsg_RemovePasswordSuggestion,
|
| + OnRemovePasswordSuggestion)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
| @@ -556,6 +558,12 @@ void PasswordAutofillAgent::OnFillPasswordForm(
|
| }
|
| }
|
|
|
| +void PasswordAutofillAgent::OnRemovePasswordSuggestion(
|
| + const PasswordForm& password_form) {
|
| + Send(new AutofillHostMsg_RemovePasswordSuggestion(routing_id(),
|
| + password_form));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // PasswordAutofillAgent, private:
|
|
|
| @@ -612,6 +620,10 @@ bool PasswordAutofillAgent::ShowSuggestionPopup(
|
| FindFormAndFieldForInputElement(
|
| user_input, &form, &field, REQUIRE_NONE);
|
|
|
| + scoped_ptr<PasswordForm> password_form =
|
| + CreatePasswordForm(user_input.form());
|
| + DCHECK(password_form);
|
| +
|
| blink::WebInputElement selected_element = user_input;
|
| gfx::Rect bounding_box(selected_element.boundsInViewportSpace());
|
|
|
| @@ -622,6 +634,7 @@ bool PasswordAutofillAgent::ShowSuggestionPopup(
|
| bounding_box.height() * scale);
|
| Send(new AutofillHostMsg_ShowPasswordSuggestions(routing_id(),
|
| field,
|
| + *password_form,
|
| bounding_box_scaled,
|
| suggestions,
|
| realms));
|
|
|