| 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/autofill_agent.h" | 5 #include "components/autofill/content/renderer/autofill_agent.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 | 10 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 GetAutofillDriver()->WillSubmitForm(form_data, base::TimeTicks::Now()); | 273 GetAutofillDriver()->WillSubmitForm(form_data, base::TimeTicks::Now()); |
| 274 submitted_forms_.insert(form_data); | 274 submitted_forms_.insert(form_data); |
| 275 } | 275 } |
| 276 | 276 |
| 277 if (form_submitted) { | 277 if (form_submitted) { |
| 278 GetAutofillDriver()->FormSubmitted(form_data); | 278 GetAutofillDriver()->FormSubmitted(form_data); |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 | 281 |
| 282 void AutofillAgent::Shutdown() { | 282 void AutofillAgent::Shutdown() { |
| 283 binding_.Close(); |
| 283 legacy_.Shutdown(); | 284 legacy_.Shutdown(); |
| 284 weak_ptr_factory_.InvalidateWeakPtrs(); | 285 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 285 } | 286 } |
| 286 | 287 |
| 287 void AutofillAgent::FocusChangeComplete() { | 288 void AutofillAgent::FocusChangeComplete() { |
| 288 WebDocument doc = render_frame()->GetWebFrame()->document(); | 289 WebDocument doc = render_frame()->GetWebFrame()->document(); |
| 289 WebElement focused_element; | 290 WebElement focused_element; |
| 290 if (!doc.isNull()) | 291 if (!doc.isNull()) |
| 291 focused_element = doc.focusedElement(); | 292 focused_element = doc.focusedElement(); |
| 292 if (!focused_element.isNull()) { | 293 if (!focused_element.isNull()) { |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { | 814 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { |
| 814 // No-op. Don't delete |this|. | 815 // No-op. Don't delete |this|. |
| 815 } | 816 } |
| 816 | 817 |
| 817 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { | 818 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { |
| 818 if (agent_) | 819 if (agent_) |
| 819 agent_->FocusChangeComplete(); | 820 agent_->FocusChangeComplete(); |
| 820 } | 821 } |
| 821 | 822 |
| 822 } // namespace autofill | 823 } // namespace autofill |
| OLD | NEW |