Chromium Code Reviews

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: 80 col. Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/form_manager.cc » ('j') | no next file with comments »
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 18 matching lines...)
29 // A bit field mask for form requirements. 29 // A bit field mask for form requirements.
30 enum RequirementsMask { 30 enum RequirementsMask {
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_OPTION_TEXT = 1 << 1, // Extract option text from
42 // WebFormSelectElement. Only valid when
43 // |EXTRACT_VALUE| is set.
44 // This is used for form submission where
45 // human readable value is captured.
46 EXTRACT_OPTIONS = 1 << 2, // Extract options from
47 // WebFormControlElement.
42 }; 48 };
43 49
44 FormManager(); 50 FormManager();
45 virtual ~FormManager(); 51 virtual ~FormManager();
46 52
47 // Fills out a FormField object from a given WebFormControlElement. 53 // Fills out a FormField object from a given WebFormControlElement.
48 // |extract_mask|: See the enum ExtractMask above for details. 54 // |extract_mask|: See the enum ExtractMask above for details.
49 static void WebFormControlElementToFormField( 55 static void WebFormControlElementToFormField(
50 const WebKit::WebFormControlElement& element, 56 const WebKit::WebFormControlElement& element,
51 ExtractMask extract_mask, 57 ExtractMask extract_mask,
(...skipping 116 matching lines...)
168 const webkit_glue::FormField* data, 174 const webkit_glue::FormField* data,
169 bool is_initiating_node); 175 bool is_initiating_node);
170 176
171 // The cached FormElement objects. 177 // The cached FormElement objects.
172 FormElementList form_elements_; 178 FormElementList form_elements_;
173 179
174 DISALLOW_COPY_AND_ASSIGN(FormManager); 180 DISALLOW_COPY_AND_ASSIGN(FormManager);
175 }; 181 };
176 182
177 #endif // CHROME_RENDERER_FORM_MANAGER_H_ 183 #endif // CHROME_RENDERER_FORM_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine