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 86c6bf030441a42d79d909db4e88f4b92f65b96e..57a7c6e69dbb819c411ed62735f8c625c0c5b1e0 100644 |
--- a/components/autofill/content/renderer/password_autofill_agent.cc |
+++ b/components/autofill/content/renderer/password_autofill_agent.cc |
@@ -621,7 +621,6 @@ PasswordAutofillAgent::PasswordAutofillAgent(content::RenderFrame* render_frame) |
logging_state_active_(false), |
was_username_autofilled_(false), |
was_password_autofilled_(false), |
- did_stop_loading_(false), |
weak_ptr_factory_(this) { |
Send(new AutofillHostMsg_PasswordAutofillAgentConstructed(routing_id())); |
} |
@@ -1044,9 +1043,16 @@ void PasswordAutofillAgent::SendPasswordForms(bool only_visible) { |
} |
if (only_visible) { |
- Send(new AutofillHostMsg_PasswordFormsRendered(routing_id(), |
- password_forms, |
- did_stop_loading_)); |
+ bool is_last_load = true; |
+ for (blink::WebFrame* frame = render_frame()->GetWebFrame()->top(); frame; |
+ frame = frame->traverseNext(false)) { |
+ if (frame != render_frame()->GetWebFrame() && frame->isLoading()) { |
+ is_last_load = false; |
+ break; |
+ } |
+ } |
+ Send(new AutofillHostMsg_PasswordFormsRendered(routing_id(), password_forms, |
+ is_last_load)); |
} else { |
Send(new AutofillHostMsg_PasswordFormsParsed(routing_id(), password_forms)); |
} |
@@ -1092,14 +1098,6 @@ void PasswordAutofillAgent::DidCommitProvisionalLoad( |
} |
} |
-void PasswordAutofillAgent::DidStartLoading() { |
- did_stop_loading_ = false; |
-} |
- |
-void PasswordAutofillAgent::DidStopLoading() { |
- did_stop_loading_ = true; |
-} |
- |
void PasswordAutofillAgent::FrameDetached() { |
// If a sub frame has been destroyed while the user was entering information |
// into a password form, try to save the data. See https://crbug.com/450806 |
@@ -1518,14 +1516,6 @@ void PasswordAutofillAgent::LegacyPasswordAutofillAgent::OnDestruct() { |
// No op. Do not delete |this|. |
} |
-void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStartLoading() { |
- agent_->DidStartLoading(); |
-} |
- |
-void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { |
- agent_->DidStopLoading(); |
-} |
- |
void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: |
DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { |
agent_->LegacyDidStartProvisionalLoad(navigated_frame); |