| 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 729cbf60e2317e0c06cb96fdcf5b720886b4652f..7a123b41d8b4b0d19249f75d557d483d084114ec 100644
|
| --- a/components/autofill/content/renderer/autofill_agent.cc
|
| +++ b/components/autofill/content/renderer/autofill_agent.cc
|
| @@ -34,6 +34,7 @@
|
| #include "components/autofill/core/common/form_data_predictions.h"
|
| #include "components/autofill/core/common/form_field_data.h"
|
| #include "components/autofill/core/common/password_form.h"
|
| +#include "components/autofill/core/common/password_form_fill_data.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/service_registry.h"
|
| #include "content/public/common/ssl_status.h"
|
| @@ -220,6 +221,8 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
|
| OnFillPasswordSuggestion)
|
| IPC_MESSAGE_HANDLER(AutofillMsg_PreviewPasswordSuggestion,
|
| OnPreviewPasswordSuggestion)
|
| + IPC_MESSAGE_HANDLER(AutofillMsg_ShowInitialPasswordAccountSuggestions,
|
| + OnShowInitialPasswordAccountSuggestions);
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
| @@ -595,6 +598,19 @@ void AutofillAgent::OnPreviewPasswordSuggestion(
|
| DCHECK(handled);
|
| }
|
|
|
| +void AutofillAgent::OnShowInitialPasswordAccountSuggestions(
|
| + int key,
|
| + const PasswordFormFillData& form_data) {
|
| + std::vector<blink::WebInputElement> elements;
|
| + password_autofill_agent_->GetFillableElementFromFormData(key, form_data,
|
| + false, &elements);
|
| + ShowSuggestionsOptions options;
|
| + options.autofill_on_empty_values = true;
|
| + options.show_full_suggestion_list = true;
|
| + for (auto element : elements)
|
| + ShowSuggestions(element, options);
|
| +}
|
| +
|
| void AutofillAgent::OnSamePageNavigationCompleted() {
|
| if (!last_interacted_form_.isNull()) {
|
| // Assume form submission only if the form is now gone, either invisible or
|
|
|