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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 455 |
456 void AutofillAgent::OnSetNodeText(const base::string16& value) { | 456 void AutofillAgent::OnSetNodeText(const base::string16& value) { |
457 SetNodeText(value, &element_); | 457 SetNodeText(value, &element_); |
458 } | 458 } |
459 | 459 |
460 void AutofillAgent::OnAcceptDataListSuggestion(const base::string16& value) { | 460 void AutofillAgent::OnAcceptDataListSuggestion(const base::string16& value) { |
461 AcceptDataListSuggestion(value); | 461 AcceptDataListSuggestion(value); |
462 } | 462 } |
463 | 463 |
464 void AutofillAgent::OnAcceptPasswordAutofillSuggestion( | 464 void AutofillAgent::OnAcceptPasswordAutofillSuggestion( |
465 const base::string16& username) { | 465 const base::string16& username, |
| 466 const base::string16& password) { |
466 // We need to make sure this is handled here because the browser process | 467 // We need to make sure this is handled here because the browser process |
467 // skipped it handling because it believed it would be handled here. If it | 468 // skipped it handling because it believed it would be handled here. If it |
468 // isn't handled here then the browser logic needs to be updated. | 469 // isn't handled here then the browser logic needs to be updated. |
469 bool handled = password_autofill_agent_->DidAcceptAutofillSuggestion( | 470 bool handled = password_autofill_agent_->DidAcceptAutofillSuggestion( |
470 element_, | 471 element_, |
471 username); | 472 username, |
| 473 password); |
472 DCHECK(handled); | 474 DCHECK(handled); |
473 } | 475 } |
474 | 476 |
475 void AutofillAgent::OnRequestAutocompleteResult( | 477 void AutofillAgent::OnRequestAutocompleteResult( |
476 WebFormElement::AutocompleteResult result, const FormData& form_data) { | 478 WebFormElement::AutocompleteResult result, const FormData& form_data) { |
477 if (in_flight_request_form_.isNull()) | 479 if (in_flight_request_form_.isNull()) |
478 return; | 480 return; |
479 | 481 |
480 if (result == WebFormElement::AutocompleteResultSuccess) { | 482 if (result == WebFormElement::AutocompleteResultSuccess) { |
481 FillFormIncludingNonFocusableElements(form_data, in_flight_request_form_); | 483 FillFormIncludingNonFocusableElements(form_data, in_flight_request_form_); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 // Only monitors dynamic forms created in the top frame. Dynamic forms | 637 // Only monitors dynamic forms created in the top frame. Dynamic forms |
636 // inserted in iframes are not captured yet. | 638 // inserted in iframes are not captured yet. |
637 if (!frame->parent()) { | 639 if (!frame->parent()) { |
638 password_autofill_agent_->OnDynamicFormsSeen(frame); | 640 password_autofill_agent_->OnDynamicFormsSeen(frame); |
639 return; | 641 return; |
640 } | 642 } |
641 } | 643 } |
642 } | 644 } |
643 | 645 |
644 } // namespace autofill | 646 } // namespace autofill |
OLD | NEW |