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

Side by Side Diff: chrome/renderer/form_manager.h

Issue 5080001: Autofill select field text should be captured not selection option value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Created 10 years, 1 month 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 | « no previous file | chrome/renderer/form_manager.cc » ('j') | chrome/renderer/form_manager.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_RENDERER_FORM_MANAGER_H_ 5 #ifndef CHROME_RENDERER_FORM_MANAGER_H_
6 #define CHROME_RENDERER_FORM_MANAGER_H_ 6 #define CHROME_RENDERER_FORM_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 REQUIRE_NONE = 0, // No requirements. 31 REQUIRE_NONE = 0, // No requirements.
32 REQUIRE_AUTOCOMPLETE = 1 << 0, // Require that autocomplete != off. 32 REQUIRE_AUTOCOMPLETE = 1 << 0, // Require that autocomplete != off.
33 REQUIRE_ENABLED = 1 << 1, // Require that disabled attribute is off. 33 REQUIRE_ENABLED = 1 << 1, // Require that disabled attribute is off.
34 REQUIRE_EMPTY = 1 << 2, // Require that the fields are empty. 34 REQUIRE_EMPTY = 1 << 2, // Require that the fields are empty.
35 }; 35 };
36 36
37 // A bit field mask to extract data from WebFormControlElement. 37 // A bit field mask to extract data from WebFormControlElement.
38 enum ExtractMask { 38 enum ExtractMask {
39 EXTRACT_NONE = 0, 39 EXTRACT_NONE = 0,
40 EXTRACT_VALUE = 1 << 0, // Extract value from WebFormControlElement. 40 EXTRACT_VALUE = 1 << 0, // Extract value from WebFormControlElement.
41 EXTRACT_OPTIONS = 1 << 1, // Extract options from WebFormControlElement. 41 EXTRACT_TEXT = 1 << 1, // Extract text from WebFormSelectElement.
42 // Only valid when |EXTRACT_VALUE| is set.
James Hawkins 2010/11/16 18:03:12 This line bothers me. What text is it extracting?
dhollowa 2010/11/16 19:25:57 Done.
43 EXTRACT_OPTIONS = 1 << 2, // Extract options from WebFormControlElement.
42 }; 44 };
43 45
44 FormManager(); 46 FormManager();
45 virtual ~FormManager(); 47 virtual ~FormManager();
46 48
47 // Fills out a FormField object from a given WebFormControlElement. 49 // Fills out a FormField object from a given WebFormControlElement.
48 // |extract_mask|: See the enum ExtractMask above for details. 50 // |extract_mask|: See the enum ExtractMask above for details.
49 static void WebFormControlElementToFormField( 51 static void WebFormControlElementToFormField(
50 const WebKit::WebFormControlElement& element, 52 const WebKit::WebFormControlElement& element,
51 ExtractMask extract_mask, 53 ExtractMask extract_mask,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 const webkit_glue::FormField* data, 170 const webkit_glue::FormField* data,
169 bool is_initiating_node); 171 bool is_initiating_node);
170 172
171 // The cached FormElement objects. 173 // The cached FormElement objects.
172 FormElementList form_elements_; 174 FormElementList form_elements_;
173 175
174 DISALLOW_COPY_AND_ASSIGN(FormManager); 176 DISALLOW_COPY_AND_ASSIGN(FormManager);
175 }; 177 };
176 178
177 #endif // CHROME_RENDERER_FORM_MANAGER_H_ 179 #endif // CHROME_RENDERER_FORM_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/form_manager.cc » ('j') | chrome/renderer/form_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698