Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(952)

Side by Side Diff: chrome/renderer/autofill/form_autofill_util.cc

Issue 8488011: Moving AutofillAgent Logic into Browser (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Initializing form_field variables Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.cc ('k') | webkit/glue/form_field.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/renderer/autofill/form_autofill_util.h" 5 #include "chrome/renderer/autofill/form_autofill_util.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/callback_old.h" 9 #include "base/callback_old.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 field->autocomplete_type = ASCIIToUTF16("x-max-data-length-exceeded"); 604 field->autocomplete_type = ASCIIToUTF16("x-max-data-length-exceeded");
605 } 605 }
606 606
607 if (!IsAutofillableElement(element)) 607 if (!IsAutofillableElement(element))
608 return; 608 return;
609 609
610 const WebInputElement* input_element = toWebInputElement(&element); 610 const WebInputElement* input_element = toWebInputElement(&element);
611 if (IsTextInput(input_element)) { 611 if (IsTextInput(input_element)) {
612 field->max_length = input_element->maxLength(); 612 field->max_length = input_element->maxLength();
613 field->is_autofilled = input_element->isAutofilled(); 613 field->is_autofilled = input_element->isAutofilled();
614 field->is_focusable = input_element->isFocusable();
615 field->should_autocomplete = input_element->autoComplete();
614 } else if (extract_mask & EXTRACT_OPTIONS) { 616 } else if (extract_mask & EXTRACT_OPTIONS) {
615 // Set option strings on the field if available. 617 // Set option strings on the field if available.
616 DCHECK(IsSelectElement(element)); 618 DCHECK(IsSelectElement(element));
617 const WebSelectElement select_element = element.toConst<WebSelectElement>(); 619 const WebSelectElement select_element = element.toConst<WebSelectElement>();
618 GetOptionStringsFromElement(select_element, 620 GetOptionStringsFromElement(select_element,
619 &field->option_values, 621 &field->option_values,
620 &field->option_contents); 622 &field->option_contents);
621 } 623 }
622 624
623 if (!(extract_mask & EXTRACT_VALUE)) 625 if (!(extract_mask & EXTRACT_VALUE))
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 continue; 893 continue;
892 894
893 if (input_element->isAutofilled()) 895 if (input_element->isAutofilled())
894 return true; 896 return true;
895 } 897 }
896 898
897 return false; 899 return false;
898 } 900 }
899 901
900 } // namespace autofill 902 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.cc ('k') | webkit/glue/form_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698