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

Side by Side Diff: webkit/forms/form_field.h

Issue 9600038: Add Password Autofill Manager to New Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 months 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
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 #ifndef WEBKIT_FORMS_FORM_FIELD_H_ 5 #ifndef WEBKIT_FORMS_FORM_FIELD_H_
6 #define WEBKIT_FORMS_FORM_FIELD_H_ 6 #define WEBKIT_FORMS_FORM_FIELD_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement .h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement .h"
12 #include "webkit/forms/webkit_forms_export.h" 12 #include "webkit/forms/webkit_forms_export.h"
13 13
14 namespace webkit { 14 namespace webkit {
15 namespace forms { 15 namespace forms {
16 16
17 // Stores information about a field in a form. 17 // Stores information about a field in a form.
18 struct WEBKIT_FORMS_EXPORT FormField { 18 struct WEBKIT_FORMS_EXPORT FormField {
19 FormField(); 19 FormField();
20 virtual ~FormField(); 20 virtual ~FormField();
21 21
22 // Equality tests for identity which does not include |value| or 22 // Equality tests for identity which does not include |value| or
23 // |is_autofilled|. 23 // |is_autofilled|.
24 // TODO(dhollowa): These operators need to be revised when we implement field 24 // TODO(dhollowa): These operators need to be revised when we implement field
25 // ids. 25 // ids.
26 bool operator==(const FormField& field) const; 26 bool operator==(const FormField& field) const;
27 bool operator!=(const FormField& field) const; 27 bool operator!=(const FormField& field) const;
28 bool operator<(const FormField& field) const;
csharp 2012/03/06 16:09:23 Not sure how best to deal with this. Using the map
Ilya Sherman 2012/03/06 20:32:44 This seems fine, but please add a comment that thi
csharp 2012/03/07 15:49:16 Done.
28 29
29 string16 label; 30 string16 label;
30 string16 name; 31 string16 name;
31 string16 value; 32 string16 value;
32 string16 form_control_type; 33 string16 form_control_type;
33 string16 autocomplete_type; 34 string16 autocomplete_type;
34 size_t max_length; 35 size_t max_length;
35 bool is_autofilled; 36 bool is_autofilled;
36 bool is_focusable; 37 bool is_focusable;
37 bool should_autocomplete; 38 bool should_autocomplete;
(...skipping 18 matching lines...) Expand all
56 EXPECT_EQ(expected.label, actual.label); \ 57 EXPECT_EQ(expected.label, actual.label); \
57 EXPECT_EQ(expected.name, actual.name); \ 58 EXPECT_EQ(expected.name, actual.name); \
58 EXPECT_EQ(expected.value, actual.value); \ 59 EXPECT_EQ(expected.value, actual.value); \
59 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \ 60 EXPECT_EQ(expected.form_control_type, actual.form_control_type); \
60 EXPECT_EQ(expected.autocomplete_type, actual.autocomplete_type); \ 61 EXPECT_EQ(expected.autocomplete_type, actual.autocomplete_type); \
61 EXPECT_EQ(expected.max_length, actual.max_length); \ 62 EXPECT_EQ(expected.max_length, actual.max_length); \
62 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \ 63 EXPECT_EQ(expected.is_autofilled, actual.is_autofilled); \
63 } while (0) 64 } while (0)
64 65
65 #endif // WEBKIT_FORMS_FORM_FIELD_H_ 66 #endif // WEBKIT_FORMS_FORM_FIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698