Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / autofill / autofill_dialog_i18n_input.h
blob9e14904e3e158bd0a179e32da70a9022f0ce6dae
1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/strings/string16.h"
12 #include "chrome/browser/ui/autofill/autofill_dialog_common.h"
13 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
14 #include "components/autofill/core/browser/autofill_type.h"
15 #include "components/autofill/core/browser/detail_input.h"
17 namespace autofill {
19 class AutofillProfile;
20 class CreditCard;
22 namespace i18ninput {
24 // Builds internationalized address input fields for |address_type| (e.g.
25 // billing or shipping) in |country_code| (e.g. "US" or "CH").
27 // The |inputs| and |language_code| are output-only parameters.
29 // The function adds the fields (at most 13) to |inputs|. This parameter should
30 // not be NULL.
32 // The function sets the |language_code| to be used for address formatting. This
33 // parameter can be NULL.
34 void BuildAddressInputs(common::AddressType address_type,
35 const std::string& country_code,
36 DetailInputs* inputs,
37 std::string* language_code);
39 // Returns whether the given card is complete and verified (i.e. was reviewed
40 // by the user and not just automatically aggregated).
41 bool CardHasCompleteAndVerifiedData(const CreditCard& card);
43 // As above, but for the address in |profile|. Region-aware, meaning that the
44 // exact set of required fields depends on the region.
45 bool AddressHasCompleteAndVerifiedData(const AutofillProfile& profile,
46 const std::string& app_locale);
48 } // namespace i18ninput
49 } // namespace autofill
51 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_