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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 return; | 594 return; |
595 } | 595 } |
596 | 596 |
597 // If autocomplete is disabled at the field level, ensure that the native | 597 // If autocomplete is disabled at the field level, ensure that the native |
598 // UI won't try to show a warning, since that may conflict with a custom | 598 // UI won't try to show a warning, since that may conflict with a custom |
599 // popup. Note that we cannot use the WebKit method element.autoComplete() | 599 // popup. Note that we cannot use the WebKit method element.autoComplete() |
600 // as it does not allow us to distinguish the case where autocomplete is | 600 // as it does not allow us to distinguish the case where autocomplete is |
601 // disabled for *both* the element and for the form. | 601 // disabled for *both* the element and for the form. |
602 const base::string16 autocomplete_attribute = | 602 const base::string16 autocomplete_attribute = |
603 element.getAttribute("autocomplete"); | 603 element.getAttribute("autocomplete"); |
604 if (LowerCaseEqualsASCII(autocomplete_attribute, "off")) | 604 if (base::LowerCaseEqualsASCII(autocomplete_attribute, "off")) |
605 display_warning_if_disabled = false; | 605 display_warning_if_disabled = false; |
606 | 606 |
607 QueryAutofillSuggestions(element, | 607 QueryAutofillSuggestions(element, |
608 display_warning_if_disabled, | 608 display_warning_if_disabled, |
609 datalist_only); | 609 datalist_only); |
610 } | 610 } |
611 | 611 |
612 void AutofillAgent::QueryAutofillSuggestions( | 612 void AutofillAgent::QueryAutofillSuggestions( |
613 const WebFormControlElement& element, | 613 const WebFormControlElement& element, |
614 bool display_warning_if_disabled, | 614 bool display_warning_if_disabled, |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 // parsed form. | 725 // parsed form. |
726 if (frame && !frame->parent() && !frame->isLoading()) { | 726 if (frame && !frame->parent() && !frame->isLoading()) { |
727 ProcessForms(*frame); | 727 ProcessForms(*frame); |
728 password_autofill_agent_->OnDynamicFormsSeen(frame); | 728 password_autofill_agent_->OnDynamicFormsSeen(frame); |
729 return; | 729 return; |
730 } | 730 } |
731 } | 731 } |
732 } | 732 } |
733 | 733 |
734 } // namespace autofill | 734 } // namespace autofill |
OLD | NEW |