| 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_ADDRESS_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_ADDRESS_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_ADDRESS_H_ | 6 #define CHROME_BROWSER_AUTOFILL_ADDRESS_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 // A form group that stores address information. | 13 // A form group that stores address information. |
| 14 class Address : public FormGroup { | 14 class Address : public FormGroup { |
| 15 public: | 15 public: |
| 16 Address() {} | 16 Address() {} |
| 17 virtual ~Address() {} | 17 virtual ~Address() {} |
| 18 | 18 |
| 19 // FormGroup implementation: | 19 // FormGroup implementation: |
| 20 virtual FormGroup* Clone() const = 0; | 20 virtual FormGroup* Clone() const = 0; |
| 21 virtual void GetPossibleFieldTypes(const string16& text, | 21 virtual void GetPossibleFieldTypes(const string16& text, |
| 22 FieldTypeSet* possible_types) const; | 22 FieldTypeSet* possible_types) const; |
| 23 virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const; |
| 23 virtual void FindInfoMatches(const AutoFillType& type, | 24 virtual void FindInfoMatches(const AutoFillType& type, |
| 24 const string16& info, | 25 const string16& info, |
| 25 std::vector<string16>* matched_text) const; | 26 std::vector<string16>* matched_text) const; |
| 26 virtual string16 GetFieldText(const AutoFillType& type) const; | 27 virtual string16 GetFieldText(const AutoFillType& type) const; |
| 27 virtual void SetInfo(const AutoFillType& type, const string16& value); | 28 virtual void SetInfo(const AutoFillType& type, const string16& value); |
| 28 | 29 |
| 29 // Sets all of the fields to the empty string. | 30 // Sets all of the fields to the empty string. |
| 30 void Clear(); | 31 void Clear(); |
| 31 | 32 |
| 32 // Sets the values of this object to the values in |address|. | 33 // Sets the values of this object to the values in |address|. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 string16 line1_; | 99 string16 line1_; |
| 99 string16 line2_; | 100 string16 line2_; |
| 100 string16 apt_num_; | 101 string16 apt_num_; |
| 101 string16 city_; | 102 string16 city_; |
| 102 string16 state_; | 103 string16 state_; |
| 103 string16 country_; | 104 string16 country_; |
| 104 string16 zip_code_; | 105 string16 zip_code_; |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 #endif // CHROME_BROWSER_AUTOFILL_ADDRESS_H_ | 108 #endif // CHROME_BROWSER_AUTOFILL_ADDRESS_H_ |
| OLD | NEW |