OLD | NEW |
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_SELECT_CONTROL_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/autofill/field_types.h" | 9 #include "chrome/browser/autofill/field_types.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 | 11 |
12 class FormGroup; | 12 class FormGroup; |
13 | 13 |
14 namespace webkit_glue { | 14 namespace webkit { |
| 15 namespace forms { |
15 struct FormField; | 16 struct FormField; |
16 } // namespace webkit_glue | 17 } |
| 18 } |
17 | 19 |
18 namespace autofill { | 20 namespace autofill { |
19 | 21 |
20 // Fills a select-one control with the appropriate value from |form_group|. | 22 // Fills a select-one control with the appropriate value from |form_group|. |
21 // Finds the matching value for field types that we know contain different | 23 // Finds the matching value for field types that we know contain different |
22 // variations of a value, e.g., (tx, TX, Texas) or credit card expiration | 24 // variations of a value, e.g., (tx, TX, Texas) or credit card expiration |
23 // months, e.g., (04, April). | 25 // months, e.g., (04, April). |
24 void FillSelectControl(const FormGroup& form_group, | 26 void FillSelectControl(const FormGroup& form_group, |
25 AutofillFieldType type, | 27 AutofillFieldType type, |
26 webkit_glue::FormField* field); | 28 webkit::forms::FormField* field); |
27 | 29 |
28 // Returns true if |value| is a valid US state name or abbreviation. It is case | 30 // Returns true if |value| is a valid US state name or abbreviation. It is case |
29 // insensitive. Valid for US states only. | 31 // insensitive. Valid for US states only. |
30 bool IsValidState(const string16& value); | 32 bool IsValidState(const string16& value); |
31 | 33 |
32 } // namespace autofill | 34 } // namespace autofill |
33 | 35 |
34 #endif // CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ | 36 #endif // CHROME_BROWSER_AUTOFILL_SELECT_CONTROL_HANDLER_H_ |
OLD | NEW |