OLD | NEW |
---|---|
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 CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ |
6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 // Classifies each field in |fields_| based upon its |autocomplete| attribute, | 117 // Classifies each field in |fields_| based upon its |autocomplete| attribute, |
118 // if the attribute is available. The association is stored into the field's | 118 // if the attribute is available. The association is stored into the field's |
119 // |heuristic_type|. | 119 // |heuristic_type|. |
120 // Fills |found_types| with |true| if the attribute is available and neither | 120 // Fills |found_types| with |true| if the attribute is available and neither |
121 // empty nor set to the special values "on" or "off" for at least one field. | 121 // empty nor set to the special values "on" or "off" for at least one field. |
122 // Fills |found_sections| with |true| if the attribute specifies a section for | 122 // Fills |found_sections| with |true| if the attribute specifies a section for |
123 // at least one field. | 123 // at least one field. |
124 void ParseFieldTypesFromAutocompleteAttributes(bool* found_types, | 124 void ParseFieldTypesFromAutocompleteAttributes(bool* found_types, |
125 bool* found_sections); | 125 bool* found_sections); |
126 | 126 |
127 bool IsStartOfAutofillableFlow() const; | |
128 | |
129 bool IsInAutofillableFlow() const; | |
130 | |
127 const AutofillField* field(size_t index) const; | 131 const AutofillField* field(size_t index) const; |
128 AutofillField* field(size_t index); | 132 AutofillField* field(size_t index); |
129 size_t field_count() const; | 133 size_t field_count() const; |
130 | 134 |
131 // Returns the number of fields that are able to be autofilled. | 135 // Returns the number of fields that are able to be autofilled. |
132 size_t autofill_count() const { return autofill_count_; } | 136 size_t autofill_count() const { return autofill_count_; } |
133 | 137 |
134 // Used for iterating over the fields. | 138 // Used for iterating over the fields. |
135 std::vector<AutofillField*>::const_iterator begin() const { | 139 std::vector<AutofillField*>::const_iterator begin() const { |
136 return fields_.begin(); | 140 return fields_.begin(); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 // to the stored upload rates. | 205 // to the stored upload rates. |
202 UploadRequired upload_required_; | 206 UploadRequired upload_required_; |
203 | 207 |
204 // The server experiment corresponding to the server types returned for this | 208 // The server experiment corresponding to the server types returned for this |
205 // form. | 209 // form. |
206 std::string server_experiment_id_; | 210 std::string server_experiment_id_; |
207 | 211 |
208 // GET or POST. | 212 // GET or POST. |
209 RequestMethod method_; | 213 RequestMethod method_; |
210 | 214 |
215 // Page number of the autofill flow, this form belongs to. If this form | |
216 // doesn't belong to any autofill flow, it is set to -1. | |
217 int page_number_; | |
Albert Bodenhamer
2013/01/14 22:10:18
current_page_number_ ?
Raman Kakilate
2013/01/14 23:37:46
Done.
| |
218 | |
219 // Total number of pages in the autofill flow. If this form doesn't belong | |
220 // to any autofill flow, it is set to -1. | |
221 int total_pages_; | |
222 | |
211 // Whether the form includes any field types explicitly specified by the site | 223 // Whether the form includes any field types explicitly specified by the site |
212 // author, via the |autocompletetype| attribute. | 224 // author, via the |autocompletetype| attribute. |
213 bool has_author_specified_types_; | 225 bool has_author_specified_types_; |
214 | 226 |
215 DISALLOW_COPY_AND_ASSIGN(FormStructure); | 227 DISALLOW_COPY_AND_ASSIGN(FormStructure); |
216 }; | 228 }; |
217 | 229 |
218 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 230 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ |
OLD | NEW |