OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
5 // Utility functions for internationalized address input fields in interactive | |
6 // autofill dialog. | |
7 | |
8 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ | |
9 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ | |
10 | |
11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | |
12 | |
13 namespace autofill { | |
14 namespace i18ninput { | |
15 | |
16 // The enum to control autofill field types in address input. | |
17 enum AddressType { | |
18 ADDRESS_TYPE_SHIPPING, | |
19 ADDRESS_TYPE_BILLING, | |
20 }; | |
21 | |
22 // Returns true if the internationalized address input is enabled. | |
23 bool IsI18nAddressInputEnabled(); | |
24 | |
25 // Returns the best guess for the current country. | |
Evan Stade
2013/10/08 23:44:51
"Returns the best guess for the user's home countr
| |
26 std::string GuessCountry(); | |
27 | |
28 // Adds the internationalized input fields to |inputs|. The autofill field types | |
29 // are specific to |address_type|. The |country_region| parameter controls the | |
30 // fields and their names. The function uses at most 13 rows starting at | |
31 // |row_index|. | |
32 // | |
33 // The inputs fields include only the address, organization name, and recipient | |
34 // name. Phone number, email, and CC are omitted. | |
35 void BuildI18nInputs(AddressType address_type, | |
36 const std::string& country_region, | |
37 int row_index, | |
38 DetailInputs* inputs); | |
39 | |
40 } // namespace i18ninput | |
41 } // namespace autofill | |
42 | |
43 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ | |
OLD | NEW |