Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_i18n_input.h

Issue 25620002: [rac] Use i18n address inputs with --enable-autofill-address-i18n flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid initializer list Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_common.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698