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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 WebInputElement* input_element = toWebInputElement(&element_); | 507 WebInputElement* input_element = toWebInputElement(&element_); |
508 if (input_element) | 508 if (input_element) |
509 PreviewFieldWithValue(value, input_element); | 509 PreviewFieldWithValue(value, input_element); |
510 } | 510 } |
511 | 511 |
512 void AutofillAgent::OnAcceptDataListSuggestion(const base::string16& value) { | 512 void AutofillAgent::OnAcceptDataListSuggestion(const base::string16& value) { |
513 AcceptDataListSuggestion(value); | 513 AcceptDataListSuggestion(value); |
514 } | 514 } |
515 | 515 |
516 void AutofillAgent::OnAcceptPasswordAutofillSuggestion( | 516 void AutofillAgent::OnAcceptPasswordAutofillSuggestion( |
517 const base::string16& username) { | 517 const base::string16& username, |
518 // We need to make sure this is handled here because the browser process | 518 const base::string16& password) { |
519 // skipped it handling because it believed it would be handled here. If it | 519 bool handled = password_autofill_agent_->AcceptSuggestion( |
520 // isn't handled here then the browser logic needs to be updated. | |
521 bool handled = password_autofill_agent_->DidAcceptAutofillSuggestion( | |
522 element_, | 520 element_, |
523 username); | 521 username, |
| 522 password); |
524 DCHECK(handled); | 523 DCHECK(handled); |
525 } | 524 } |
526 | 525 |
527 void AutofillAgent::OnRequestAutocompleteResult( | 526 void AutofillAgent::OnRequestAutocompleteResult( |
528 WebFormElement::AutocompleteResult result, | 527 WebFormElement::AutocompleteResult result, |
529 const base::string16& message, | 528 const base::string16& message, |
530 const FormData& form_data) { | 529 const FormData& form_data) { |
531 if (in_flight_request_form_.isNull()) | 530 if (in_flight_request_form_.isNull()) |
532 return; | 531 return; |
533 | 532 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 // Only monitors dynamic forms created in the top frame. Dynamic forms | 700 // Only monitors dynamic forms created in the top frame. Dynamic forms |
702 // inserted in iframes are not captured yet. | 701 // inserted in iframes are not captured yet. |
703 if (frame && !frame->parent()) { | 702 if (frame && !frame->parent()) { |
704 password_autofill_agent_->OnDynamicFormsSeen(frame); | 703 password_autofill_agent_->OnDynamicFormsSeen(frame); |
705 return; | 704 return; |
706 } | 705 } |
707 } | 706 } |
708 } | 707 } |
709 | 708 |
710 } // namespace autofill | 709 } // namespace autofill |
OLD | NEW |