OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/content/renderer/password_generation_agent.h" | 5 #include "components/autofill/content/renderer/password_generation_agent.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 192 } |
193 | 193 |
194 void PasswordGenerationAgent::DidFinishLoad() { | 194 void PasswordGenerationAgent::DidFinishLoad() { |
195 // Since forms on some sites are available only at this event (but not at | 195 // Since forms on some sites are available only at this event (but not at |
196 // DidFinishDocumentLoad), again call FindPossibleGenerationForm to detect | 196 // DidFinishDocumentLoad), again call FindPossibleGenerationForm to detect |
197 // these forms (crbug.com/617893). | 197 // these forms (crbug.com/617893). |
198 FindPossibleGenerationForm(); | 198 FindPossibleGenerationForm(); |
199 } | 199 } |
200 | 200 |
201 void PasswordGenerationAgent::OnDestruct() { | 201 void PasswordGenerationAgent::OnDestruct() { |
| 202 binding_.Close(); |
202 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); | 203 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
203 } | 204 } |
204 | 205 |
205 void PasswordGenerationAgent::OnDynamicFormsSeen() { | 206 void PasswordGenerationAgent::OnDynamicFormsSeen() { |
206 FindPossibleGenerationForm(); | 207 FindPossibleGenerationForm(); |
207 } | 208 } |
208 | 209 |
209 void PasswordGenerationAgent::AllowToRunFormClassifier() { | 210 void PasswordGenerationAgent::AllowToRunFormClassifier() { |
210 form_classifier_enabled_ = true; | 211 form_classifier_enabled_ = true; |
211 } | 212 } |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 ShowGenerationPopup(); | 571 ShowGenerationPopup(); |
571 } | 572 } |
572 | 573 |
573 const mojom::PasswordManagerDriverPtr& | 574 const mojom::PasswordManagerDriverPtr& |
574 PasswordGenerationAgent::GetPasswordManagerDriver() { | 575 PasswordGenerationAgent::GetPasswordManagerDriver() { |
575 DCHECK(password_agent_); | 576 DCHECK(password_agent_); |
576 return password_agent_->GetPasswordManagerDriver(); | 577 return password_agent_->GetPasswordManagerDriver(); |
577 } | 578 } |
578 | 579 |
579 } // namespace autofill | 580 } // namespace autofill |
OLD | NEW |