| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 MATCH_LABEL = 1 << 0, | 37 MATCH_LABEL = 1 << 0, |
| 38 MATCH_NAME = 1 << 1, | 38 MATCH_NAME = 1 << 1, |
| 39 MATCH_VALUE = 1 << 2, | 39 MATCH_VALUE = 1 << 2, |
| 40 | 40 |
| 41 // Input types. | 41 // Input types. |
| 42 MATCH_TEXT = 1 << 3, | 42 MATCH_TEXT = 1 << 3, |
| 43 MATCH_EMAIL = 1 << 4, | 43 MATCH_EMAIL = 1 << 4, |
| 44 MATCH_TELEPHONE = 1 << 5, | 44 MATCH_TELEPHONE = 1 << 5, |
| 45 MATCH_SELECT = 1 << 6, | 45 MATCH_SELECT = 1 << 6, |
| 46 MATCH_TEXT_AREA = 1 << 7, | 46 MATCH_TEXT_AREA = 1 << 7, |
| 47 MATCH_PASSWORD = 1 << 8, |
| 47 MATCH_ALL_INPUTS = | 48 MATCH_ALL_INPUTS = |
| 48 MATCH_TEXT | MATCH_EMAIL | MATCH_TELEPHONE | MATCH_SELECT | | 49 MATCH_TEXT | MATCH_EMAIL | MATCH_TELEPHONE | MATCH_SELECT | |
| 49 MATCH_TEXT_AREA, | 50 MATCH_TEXT_AREA | MATCH_PASSWORD, |
| 50 | 51 |
| 51 // By default match label and name for input/text types. | 52 // By default match label and name for input/text types. |
| 52 MATCH_DEFAULT = MATCH_LABEL | MATCH_NAME | MATCH_VALUE | MATCH_TEXT, | 53 MATCH_DEFAULT = MATCH_LABEL | MATCH_NAME | MATCH_VALUE | MATCH_TEXT, |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 // Only derived classes may instantiate. | 56 // Only derived classes may instantiate. |
| 56 FormField() {} | 57 FormField() {} |
| 57 | 58 |
| 58 // Attempts to parse a form field with the given pattern. Returns true on | 59 // Attempts to parse a form field with the given pattern. Returns true on |
| 59 // success and fills |match| with a pointer to the field. | 60 // success and fills |match| with a pointer to the field. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 120 |
| 120 // Returns true iff |type| matches |match_type|. | 121 // Returns true iff |type| matches |match_type|. |
| 121 static bool MatchesFormControlType(const std::string& type, int match_type); | 122 static bool MatchesFormControlType(const std::string& type, int match_type); |
| 122 | 123 |
| 123 DISALLOW_COPY_AND_ASSIGN(FormField); | 124 DISALLOW_COPY_AND_ASSIGN(FormField); |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 } // namespace autofill | 127 } // namespace autofill |
| 127 | 128 |
| 128 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ | 129 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ |
| OLD | NEW |