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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_INPUT_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_INPUT_H_
7
8 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
9
10 namespace autofill {
11 namespace common {
12
13 // An object for building inputs for autofill sections. The object uses the
14 // browser locale to determine the country/region and language for the inputs.
15 // The object also allows specifying a country/region that is different from the
16 // application locale.
17 //
18 // Sample usage:
19 // DialogSection dialog_section = ...;
20 // DetailInputs detail_inputs;
21 // scoped_ptr<AutofillDialogInput> input(
22 // AutofillDialogInput::BuildInstance());
23 // input->buildInputsForSection(dialog_section, &detail_inputs);
24 // Process(detail_inputs);
25 class AutofillDialogInput {
26 public:
27 // Returns a new instance of this class. The caller owns the result.
28 static AutofillDialogInput* BuildInstance();
Evan Stade 2013/10/02 00:57:19 nit: factory function should be named Create()
29
30 // Constructs |inputs| for a given |dialog_section|. The |inputs| parameter
31 // must be non-null. Does not take ownership of |inputs|.
Evan Stade 2013/10/02 00:57:19 nit: just mention that |inputs| is an out-param; n
32 virtual void BuildInputsForSection(DialogSection dialog_section,
33 DetailInputs* inputs) = 0;
34
35 // Same as above, but uses the |selected_country_region| instead of the
36 // application locale for the country/region-specific inputs. The
37 // country/region selection does not affect the language settings.
38 virtual void BuildInputsForSection(DialogSection dialog_section,
39 const std::string& selected_country_region,
40 DetailInputs* inputs) = 0;
41
42 virtual ~AutofillDialogInput() {}
43 };
44
45 } // namespace common
46 } // namespace autofill
47
48 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_INPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698