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

Side by Side Diff: chrome/browser/autofill/form_structure.h

Issue 11539003: Pop up requestAutocomplete UI when autofill server hints chrome client that it is in a multipage au… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed Albert's comments Created 7 years, 11 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 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
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;
Ilya Sherman 2013/01/15 06:31:52 nit: Please add documentation for these methods.
Raman Kakilate 2013/01/15 23:02:33 Done.
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
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.
Ilya Sherman 2013/01/15 06:31:52 What if the received XML specifies that the page n
Ilya Sherman 2013/01/15 06:31:52 Is this zero-indexed or 1-indexed?
Raman Kakilate 2013/01/15 23:02:33 Zero indexed. Added in the comment.
Raman Kakilate 2013/01/15 23:02:33 Updated implementation of IsStartOfAutofillableFlo
217 int current_page_number_;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698