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

Side by Side Diff: chrome/browser/ui/autofill/data_model_wrapper.h

Issue 63053003: Ask libaddressinput for address components to use in requestAutocomplete(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: let's try this again, android Created 7 years 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 // A glue class that allows uniform interactions with autocomplete data sources, 31 // A glue class that allows uniform interactions with autocomplete data sources,
32 // regardless of their type. Implementations are intended to be lightweight and 32 // regardless of their type. Implementations are intended to be lightweight and
33 // copyable, only holding weak references to their backing model. 33 // copyable, only holding weak references to their backing model.
34 class DataModelWrapper { 34 class DataModelWrapper {
35 public: 35 public:
36 virtual ~DataModelWrapper(); 36 virtual ~DataModelWrapper();
37 37
38 // Fills in |inputs| with the data that this model contains (|inputs| is an 38 // Fills in |inputs| with the data that this model contains (|inputs| is an
39 // out-param). 39 // out-param). |country_code| is the country used for |inputs|' section.
40 void FillInputs(DetailInputs* inputs); 40 void FillInputs(DetailInputs* inputs, const std::string& country_code);
41 41
42 // Returns the data for a specific autocomplete type in a format for filling 42 // Returns the data for a specific autocomplete type in a format for filling
43 // into a web form. 43 // into a web form.
44 virtual base::string16 GetInfo(const AutofillType& type) const = 0; 44 virtual base::string16 GetInfo(const AutofillType& type) const = 0;
45 45
46 // Returns the data for a specified type in a format optimized for displaying 46 // Returns the data for a specified type in a format optimized for displaying
47 // to the user. 47 // to the user.
48 virtual base::string16 GetInfoForDisplay(const AutofillType& type) const; 48 virtual base::string16 GetInfoForDisplay(const AutofillType& type) const;
49 49
50 // Returns the icon, if any, that represents this model. 50 // Returns the icon, if any, that represents this model.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 private: 230 private:
231 const FieldValueMap& field_map_; 231 const FieldValueMap& field_map_;
232 232
233 DISALLOW_COPY_AND_ASSIGN(FieldMapWrapper); 233 DISALLOW_COPY_AND_ASSIGN(FieldMapWrapper);
234 }; 234 };
235 235
236 } // namespace autofill 236 } // namespace autofill
237 237
238 #endif // CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_ 238 #endif // CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698