Index: chrome/browser/ui/autofill/autofill_dialog_i18n_input.h |
diff --git a/chrome/browser/ui/autofill/autofill_dialog_i18n_input.h b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e70bdc2d7553fec8406ac55f1eff99f1ebc8bf2f |
--- /dev/null |
+++ b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+// |
+// Utility functions for internationalized address input fields in interactive |
+// autofill dialog. |
+ |
+#ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ |
+#define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ |
+ |
+#include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
+ |
+namespace autofill { |
+namespace i18ninput { |
+ |
+// The enum to control autofill field types in address input. |
+enum AddressType { |
+ ADDRESS_TYPE_SHIPPING, |
+ ADDRESS_TYPE_BILLING, |
+}; |
+ |
+// Returns true if the internationalized address input is enabled. |
+bool IsI18nAddressInputEnabled(); |
+ |
+// Returns the best guess for the current country. |
+std::string GuessCountry(); |
+ |
+// Adds the internationalized input fields to |inputs|. The autofill field types |
+// are specific to |address_type|. The |country_region| parameter controls the |
+// fields and their names. The function uses at most 13 rows starting at |
+// |row_index|. |
+// |
+// The inputs fields include only the address, organization name, and recipient |
+// name. Phone number, email, and CC are omitted. |
+void BuildI18nInputs(AddressType address_type, |
+ const std::string& country_region, |
+ int row_index, |
+ DetailInputs* inputs); |
+ |
+} // namespace i18ninput |
+} // namespace autofill |
+ |
+#endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ |