OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 WEBKIT_GLUE_FORM_FIELD_VALUES_H_ | 5 #ifndef WEBKIT_GLUE_FORM_FIELD_VALUES_H_ |
6 #define WEBKIT_GLUE_FORM_FIELD_VALUES_H_ | 6 #define WEBKIT_GLUE_FORM_FIELD_VALUES_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
| 10 #include "base/string16.h" |
| 11 #include "googleurl/src/gurl.h" |
10 #include "webkit/glue/form_field.h" | 12 #include "webkit/glue/form_field.h" |
11 | 13 |
12 namespace WebKit { | 14 namespace WebKit { |
13 class WebForm; | 15 class WebForm; |
14 } | 16 } |
15 | 17 |
16 namespace webkit_glue { | 18 namespace webkit_glue { |
17 | 19 |
18 // The FormFieldValues struct represents a single HTML form together with the | 20 // The FormFieldValues class represents a single HTML form together with the |
19 // values entered in the fields. | 21 // values entered in the fields. |
20 class FormFieldValues { | 22 class FormFieldValues { |
21 public: | 23 public: |
22 static FormFieldValues* Create(const WebKit::WebForm& form); | 24 static FormFieldValues* Create(const WebKit::WebForm& webform); |
| 25 |
| 26 // The name of the form. |
| 27 string16 form_name; |
| 28 |
| 29 // The source URL. |
| 30 GURL source_url; |
| 31 |
| 32 // The target URL. |
| 33 GURL target_url; |
23 | 34 |
24 // A vector of all the input fields in the form. | 35 // A vector of all the input fields in the form. |
25 std::vector<FormField> elements; | 36 std::vector<FormField> elements; |
| 37 |
| 38 private: |
| 39 void ExtractFormFieldValues(const WebKit::WebForm& webform); |
26 }; | 40 }; |
27 | 41 |
28 } // namespace webkit_glue | 42 } // namespace webkit_glue |
29 | 43 |
30 #endif // WEBKIT_GLUE_FORM_FIELD_VALUES_H_ | 44 #endif // WEBKIT_GLUE_FORM_FIELD_VALUES_H_ |
OLD | NEW |