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_PHONE_NUMBER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "chrome/browser/autofill/form_group.h" | 12 #include "chrome/browser/autofill/form_group.h" |
13 | 13 |
14 // A form group that stores phone number information. | 14 // A form group that stores phone number information. |
15 class PhoneNumber : public FormGroup { | 15 class PhoneNumber : public FormGroup { |
16 public: | 16 public: |
17 PhoneNumber() {} | 17 PhoneNumber(); |
18 virtual ~PhoneNumber() {} | 18 virtual ~PhoneNumber(); |
19 | 19 |
20 // FormGroup implementation: | 20 // FormGroup implementation: |
21 virtual FormGroup* Clone() const = 0; | 21 virtual FormGroup* Clone() const = 0; |
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 GetAvailableFieldTypes(FieldTypeSet* available_types) const; |
25 virtual void FindInfoMatches(const AutoFillType& type, | 25 virtual void FindInfoMatches(const AutoFillType& type, |
26 const string16& info, | 26 const string16& info, |
27 std::vector<string16>* matched_text) const; | 27 std::vector<string16>* matched_text) const; |
28 virtual string16 GetFieldText(const AutoFillType& type) const; | 28 virtual string16 GetFieldText(const AutoFillType& type) const; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 static void StripPunctuation(string16* number); | 93 static void StripPunctuation(string16* number); |
94 | 94 |
95 // The pieces of the phone number. | 95 // The pieces of the phone number. |
96 string16 country_code_; | 96 string16 country_code_; |
97 string16 city_code_; // city or area code. | 97 string16 city_code_; // city or area code. |
98 string16 number_; | 98 string16 number_; |
99 string16 extension_; | 99 string16 extension_; |
100 }; | 100 }; |
101 | 101 |
102 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ | 102 #endif // CHROME_BROWSER_AUTOFILL_PHONE_NUMBER_H_ |
OLD | NEW |