OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/WebKit/chromium/public/WebInputElement.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebOptionElement.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebOptionElement.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const string16& value, | 59 const string16& value, |
60 const string16& form_control_type, | 60 const string16& form_control_type, |
61 int size) | 61 int size) |
62 : label_(label), | 62 : label_(label), |
63 name_(name), | 63 name_(name), |
64 value_(value), | 64 value_(value), |
65 form_control_type_(form_control_type), | 65 form_control_type_(form_control_type), |
66 size_(size) { | 66 size_(size) { |
67 } | 67 } |
68 | 68 |
| 69 FormField::~FormField() { |
| 70 } |
| 71 |
69 bool FormField::operator==(const FormField& field) const { | 72 bool FormField::operator==(const FormField& field) const { |
70 // A FormField stores a value, but the value is not part of the identity of | 73 // A FormField stores a value, but the value is not part of the identity of |
71 // the field, so we don't want to compare the values. | 74 // the field, so we don't want to compare the values. |
72 return (label_ == field.label_ && | 75 return (label_ == field.label_ && |
73 name_ == field.name_ && | 76 name_ == field.name_ && |
74 form_control_type_ == field.form_control_type_ && | 77 form_control_type_ == field.form_control_type_ && |
75 size_ == field.size_); | 78 size_ == field.size_); |
76 } | 79 } |
77 | 80 |
78 bool FormField::operator!=(const FormField& field) const { | 81 bool FormField::operator!=(const FormField& field) const { |
(...skipping 15 matching lines...) Expand all Loading... |
94 << UTF16ToUTF8(field.name()) | 97 << UTF16ToUTF8(field.name()) |
95 << " " | 98 << " " |
96 << UTF16ToUTF8(field.value()) | 99 << UTF16ToUTF8(field.value()) |
97 << " " | 100 << " " |
98 << UTF16ToUTF8(field.form_control_type()) | 101 << UTF16ToUTF8(field.form_control_type()) |
99 << " " | 102 << " " |
100 << field.size(); | 103 << field.size(); |
101 } | 104 } |
102 | 105 |
103 } // namespace webkit_glue | 106 } // namespace webkit_glue |
OLD | NEW |