| 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_AUTOFILL_FIELD_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "chrome/browser/autofill/field_types.h" | 12 #include "chrome/browser/autofill/field_types.h" |
| 13 #include "webkit/forms/form_field.h" | 13 #include "chrome/common/form_field.h" |
| 14 | 14 |
| 15 class AutofillField : public webkit::forms::FormField { | 15 class AutofillField : public chrome::FormField { |
| 16 public: | 16 public: |
| 17 enum PhonePart { | 17 enum PhonePart { |
| 18 IGNORED = 0, | 18 IGNORED = 0, |
| 19 PHONE_PREFIX = 1, | 19 PHONE_PREFIX = 1, |
| 20 PHONE_SUFFIX = 2, | 20 PHONE_SUFFIX = 2, |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 AutofillField(); | 23 AutofillField(); |
| 24 AutofillField(const webkit::forms::FormField& field, | 24 AutofillField(const chrome::FormField& field, const string16& unique_name); |
| 25 const string16& unique_name); | |
| 26 virtual ~AutofillField(); | 25 virtual ~AutofillField(); |
| 27 | 26 |
| 28 const string16& unique_name() const { return unique_name_; } | 27 const string16& unique_name() const { return unique_name_; } |
| 29 | 28 |
| 30 const string16& section() const { return section_; } | 29 const string16& section() const { return section_; } |
| 31 AutofillFieldType heuristic_type() const { return heuristic_type_; } | 30 AutofillFieldType heuristic_type() const { return heuristic_type_; } |
| 32 AutofillFieldType server_type() const { return server_type_; } | 31 AutofillFieldType server_type() const { return server_type_; } |
| 33 const FieldTypeSet& possible_types() const { return possible_types_; } | 32 const FieldTypeSet& possible_types() const { return possible_types_; } |
| 34 PhonePart phone_part() const { return phone_part_; } | 33 PhonePart phone_part() const { return phone_part_; } |
| 35 | 34 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // The set of possible types for this field. | 73 // The set of possible types for this field. |
| 75 FieldTypeSet possible_types_; | 74 FieldTypeSet possible_types_; |
| 76 | 75 |
| 77 // Used to track whether this field is a phone prefix or suffix. | 76 // Used to track whether this field is a phone prefix or suffix. |
| 78 PhonePart phone_part_; | 77 PhonePart phone_part_; |
| 79 | 78 |
| 80 DISALLOW_COPY_AND_ASSIGN(AutofillField); | 79 DISALLOW_COPY_AND_ASSIGN(AutofillField); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ | 82 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_FIELD_H_ |
| OLD | NEW |