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