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

Side by Side Diff: webkit/glue/form_field.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 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 | « webkit/glue/form_field.h ('k') | no next file » | 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 "webkit/glue/form_field.h" 5 #include "webkit/glue/form_field.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebOptionElement.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebOptionElement.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h"
12 12
13 using WebKit::WebFormControlElement; 13 using WebKit::WebFormControlElement;
14 using WebKit::WebElement; 14 using WebKit::WebElement;
15 using WebKit::WebInputElement; 15 using WebKit::WebInputElement;
16 using WebKit::WebOptionElement; 16 using WebKit::WebOptionElement;
17 using WebKit::WebSelectElement; 17 using WebKit::WebSelectElement;
18 using WebKit::WebVector; 18 using WebKit::WebVector;
19 19
20 namespace webkit_glue { 20 namespace webkit_glue {
21 21
22 FormField::FormField() 22 FormField::FormField()
23 : max_length(0), 23 : max_length(0),
24 is_autofilled(false) { 24 is_autofilled(false),
25 is_focusable(false),
26 should_autocomplete(false) {
25 } 27 }
26 28
27 FormField::~FormField() { 29 FormField::~FormField() {
28 } 30 }
29 31
30 bool FormField::operator==(const FormField& field) const { 32 bool FormField::operator==(const FormField& field) const {
31 // A FormField stores a value, but the value is not part of the identity of 33 // A FormField stores a value, but the value is not part of the identity of
32 // the field, so we don't want to compare the values. 34 // the field, so we don't want to compare the values.
33 return (label == field.label && 35 return (label == field.label &&
34 name == field.name && 36 name == field.name &&
(...skipping 13 matching lines...) Expand all
48 << UTF16ToUTF8(field.name) 50 << UTF16ToUTF8(field.name)
49 << " " 51 << " "
50 << UTF16ToUTF8(field.value) 52 << UTF16ToUTF8(field.value)
51 << " " 53 << " "
52 << UTF16ToUTF8(field.form_control_type) 54 << UTF16ToUTF8(field.form_control_type)
53 << " " 55 << " "
54 << UTF16ToUTF8(field.autocomplete_type) 56 << UTF16ToUTF8(field.autocomplete_type)
55 << " " 57 << " "
56 << field.max_length 58 << field.max_length
57 << " " 59 << " "
58 << (field.is_autofilled ? "true" : "false"); 60 << (field.is_autofilled ? "true" : "false")
61 << " "
62 << (field.is_focusable ? "true" : "false")
63 << " "
64 << (field.should_autocomplete ? "true" : "false");
59 } 65 }
60 66
61 } // namespace webkit_glue 67 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/form_field.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698