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_FAX_NUMBER_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_FAX_NUMBER_H_ |
6 #define CHROME_BROWSER_AUTOFILL_FAX_NUMBER_H_ | 6 #define CHROME_BROWSER_AUTOFILL_FAX_NUMBER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/autofill/phone_number.h" | 9 #include "chrome/browser/autofill/phone_number.h" |
10 | 10 |
11 class FormGroup; | 11 class FormGroup; |
12 | 12 |
13 class FaxNumber : public PhoneNumber { | 13 class FaxNumber : public PhoneNumber { |
14 public: | 14 public: |
15 FaxNumber() {} | 15 FaxNumber(); |
16 virtual FormGroup* Clone() const { return new FaxNumber(*this); } | 16 virtual ~FaxNumber(); |
| 17 |
| 18 virtual FormGroup* Clone() const; |
17 | 19 |
18 protected: | 20 protected: |
19 virtual AutoFillFieldType GetNumberType() const { | 21 virtual AutoFillFieldType GetNumberType() const; |
20 return PHONE_FAX_NUMBER; | 22 virtual AutoFillFieldType GetCityCodeType() const; |
21 } | 23 virtual AutoFillFieldType GetCountryCodeType() const; |
22 | 24 virtual AutoFillFieldType GetCityAndNumberType() const; |
23 virtual AutoFillFieldType GetCityCodeType() const { | 25 virtual AutoFillFieldType GetWholeNumberType() const; |
24 return PHONE_FAX_CITY_CODE; | |
25 } | |
26 | |
27 virtual AutoFillFieldType GetCountryCodeType() const { | |
28 return PHONE_FAX_COUNTRY_CODE; | |
29 } | |
30 | |
31 virtual AutoFillFieldType GetCityAndNumberType() const { | |
32 return PHONE_FAX_CITY_AND_NUMBER; | |
33 } | |
34 | |
35 virtual AutoFillFieldType GetWholeNumberType() const { | |
36 return PHONE_FAX_WHOLE_NUMBER; | |
37 } | |
38 | 26 |
39 private: | 27 private: |
40 explicit FaxNumber(const FaxNumber& phone) : PhoneNumber(phone) {} | 28 explicit FaxNumber(const FaxNumber& phone) : PhoneNumber(phone) {} |
41 void operator=(const FaxNumber& phone); | 29 void operator=(const FaxNumber& phone); |
42 }; | 30 }; |
43 | 31 |
44 #endif // CHROME_BROWSER_AUTOFILL_FAX_NUMBER_H_ | 32 #endif // CHROME_BROWSER_AUTOFILL_FAX_NUMBER_H_ |
OLD | NEW |