OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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_ |
OLD | NEW |