OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CONTACT_INFO_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ |
6 #define CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ | 6 #define CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "chrome/browser/autofill/form_group.h" | 11 #include "chrome/browser/autofill/form_group.h" |
12 | 12 |
13 typedef std::vector<string16> NameTokens; | 13 typedef std::vector<string16> NameTokens; |
14 | 14 |
15 // A form group that stores contact information. | 15 // A form group that stores contact information. |
16 class ContactInfo : public FormGroup { | 16 class ContactInfo : public FormGroup { |
17 public: | 17 public: |
18 ContactInfo() {} | 18 ContactInfo() {} |
19 | 19 |
20 // FormGroup implementation: | 20 // FormGroup implementation: |
21 virtual FormGroup* Clone() const; | 21 virtual FormGroup* Clone() const; |
22 virtual void GetPossibleFieldTypes(const string16& text, | 22 virtual void GetPossibleFieldTypes(const string16& text, |
23 FieldTypeSet* possible_types) const; | 23 FieldTypeSet* possible_types) const; |
| 24 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const; |
24 virtual void FindInfoMatches(const AutoFillType& type, | 25 virtual void FindInfoMatches(const AutoFillType& type, |
25 const string16& info, | 26 const string16& info, |
26 std::vector<string16>* matched_text) const; | 27 std::vector<string16>* matched_text) const; |
27 virtual string16 GetFieldText(const AutoFillType& type) const; | 28 virtual string16 GetFieldText(const AutoFillType& type) const; |
28 virtual void SetInfo(const AutoFillType& type, const string16& value); | 29 virtual void SetInfo(const AutoFillType& type, const string16& value); |
29 | 30 |
30 private: | 31 private: |
31 friend class ContactInfoTest; | 32 friend class ContactInfoTest; |
32 explicit ContactInfo(const ContactInfo& contact_info); | 33 explicit ContactInfo(const ContactInfo& contact_info); |
33 void operator=(const ContactInfo& info); | 34 void operator=(const ContactInfo& info); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Contact information data. | 105 // Contact information data. |
105 string16 first_; | 106 string16 first_; |
106 string16 middle_; | 107 string16 middle_; |
107 string16 last_; | 108 string16 last_; |
108 string16 suffix_; | 109 string16 suffix_; |
109 string16 email_; | 110 string16 email_; |
110 string16 company_name_; | 111 string16 company_name_; |
111 }; | 112 }; |
112 | 113 |
113 #endif // CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ | 114 #endif // CHROME_BROWSER_AUTOFILL_CONTACT_INFO_H_ |
OLD | NEW |