12a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
22a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
32a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// found in the LICENSE file.
42a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
52a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#ifndef CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_
62a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_
72a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <vector>
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "base/compiler_specific.h"
117d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#include "base/strings/string16.h"
122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
13868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#include "components/autofill/content/browser/wallet/wallet_items.h"
14d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)#include "components/autofill/core/browser/field_types.h"
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "components/autofill/core/browser/form_structure.h"
162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace gfx {
182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class Image;
192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
21effb81e5f8246d0db0270817048dc992db66e9fbBen Murdochnamespace i18n {
22effb81e5f8246d0db0270817048dc992db66e9fbBen Murdochnamespace addressinput {
23effb81e5f8246d0db0270817048dc992db66e9fbBen Murdochstruct AddressData;
24effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch}
25effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch}
26effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace autofill {
282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
29c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)class AutofillDataModel;
30c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)class AutofillProfile;
313240926e260ce088908e02ac07a6cf7b0c0cbf44Ben Murdochclass AutofillType;
32c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)class CreditCard;
33c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)class FormStructure;
34c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)namespace wallet {
362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class Address;
372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class FullWallet;
382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// A glue class that allows uniform interactions with autocomplete data sources,
412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// regardless of their type. Implementations are intended to be lightweight and
422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// copyable, only holding weak references to their backing model.
432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class DataModelWrapper {
442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual ~DataModelWrapper();
462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
47d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // Fills in |inputs| with the data that this model contains (|inputs| is an
48d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // out-param).
49d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  void FillInputs(DetailInputs* inputs);
50d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
514e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  // Returns the data for a specific autocomplete type in a format for filling
524e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  // into a web form.
53c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const = 0;
542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
554e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  // Returns the data for a specified type in a format optimized for displaying
564e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  // to the user.
574e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  virtual base::string16 GetInfoForDisplay(const AutofillType& type) const;
584e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)
592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  // Returns the icon, if any, that represents this model.
602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual gfx::Image GetIcon();
612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
62c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  // Gets text to display to the user to summarize this data source. The
63c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  // default implementation assumes this is an address. Both params are required
64c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  // to be non-NULL and will be filled in with text that is vertically compact
65c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  // (but may take up a lot of horizontal space) and horizontally compact (but
66c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  // may take up a lot of vertical space) respectively. The return value will
67c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  // be true and the outparams will be filled in only if the data represented is
68c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  // complete and valid.
69c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual bool GetDisplayText(base::string16* vertically_compact,
70c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch                              base::string16* horizontally_compact);
712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
72a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  // Returns the BCP 47 language code that should be used for formatting the
73a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  // data for display.
74a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const = 0;
75a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch
762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  // Fills in |form_structure| with the data that this model contains. |inputs|
772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  // and |comparator| are used to determine whether each field in the
78868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)  // FormStructure should be filled in or left alone. Returns whether any fields
79868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)  // in |form_structure| were found to be matching.
80868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)  bool FillFormStructure(
815d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const std::vector<ServerFieldType>& types,
825d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const FormStructure::InputFieldComparator& compare,
83868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)      FormStructure* form_structure) const;
842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected:
86c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DataModelWrapper();
87c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
88c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) private:
89c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(DataModelWrapper);
902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
92d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)// A DataModelWrapper for Autofill profiles.
93d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)class AutofillProfileWrapper : public DataModelWrapper {
942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
95d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  explicit AutofillProfileWrapper(const AutofillProfile* profile);
96d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  AutofillProfileWrapper(const AutofillProfile* profile,
97d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)                         const AutofillType& variant_type,
98d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)                         size_t variant);
99d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  virtual ~AutofillProfileWrapper();
1002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
101c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
1024e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  virtual base::string16 GetInfoForDisplay(const AutofillType& type) const
1034e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)      OVERRIDE;
104a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const OVERRIDE;
1052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) protected:
107d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // Returns the variant that should be used when dealing with an element that
108d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // has the given |type|.
109d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  size_t GetVariantForType(const AutofillType& type) const;
1102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private:
1122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  const AutofillProfile* profile_;
113c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
114d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // The profile variant. |variant_| describes which variant of |variant_group_|
115d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  // to use in the profile.
116d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  FieldTypeGroup variant_group_;
117d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  size_t variant_;
118d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)
119c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(AutofillProfileWrapper);
1202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
1212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
12258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)// A DataModelWrapper specifically for shipping address profiles.
12358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)class AutofillShippingAddressWrapper : public AutofillProfileWrapper {
12458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) public:
125d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)  explicit AutofillShippingAddressWrapper(const AutofillProfile* profile);
12658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)  virtual ~AutofillShippingAddressWrapper();
12758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
12858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
12958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
13058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) private:
13158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(AutofillShippingAddressWrapper);
13258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)};
13358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
1342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// A DataModelWrapper specifically for Autofill CreditCard data.
135d0247b1b59f9c528cb6df88b4f2b9afaf80d181eTorne (Richard Coles)class AutofillCreditCardWrapper : public DataModelWrapper {
1362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
1372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  explicit AutofillCreditCardWrapper(const CreditCard* card);
1382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual ~AutofillCreditCardWrapper();
1392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
140c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
1412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual gfx::Image GetIcon() OVERRIDE;
142c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual bool GetDisplayText(base::string16* vertically_compact,
143c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch                              base::string16* horizontally_compact) OVERRIDE;
144a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const OVERRIDE;
1452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private:
1472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  const CreditCard* card_;
148c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
149c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(AutofillCreditCardWrapper);
1502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
1512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// A DataModelWrapper for Wallet addresses.
1532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class WalletAddressWrapper : public DataModelWrapper {
1542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
1552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  explicit WalletAddressWrapper(const wallet::Address* address);
1562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual ~WalletAddressWrapper();
1572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
158c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
1594e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  virtual base::string16 GetInfoForDisplay(const AutofillType& type) const
1604e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)      OVERRIDE;
161c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual bool GetDisplayText(base::string16* vertically_compact,
162c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch                              base::string16* horizontally_compact) OVERRIDE;
163a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const OVERRIDE;
1642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private:
1662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  const wallet::Address* address_;
167c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
168c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(WalletAddressWrapper);
1692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
1702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// A DataModelWrapper for Wallet instruments.
1722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class WalletInstrumentWrapper : public DataModelWrapper {
1732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
1742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  explicit WalletInstrumentWrapper(
1752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      const wallet::WalletItems::MaskedInstrument* instrument);
1762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual ~WalletInstrumentWrapper();
1772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
178c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
1794e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)  virtual base::string16 GetInfoForDisplay(const AutofillType& type) const
1804e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)      OVERRIDE;
1812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual gfx::Image GetIcon() OVERRIDE;
182c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual bool GetDisplayText(base::string16* vertically_compact,
183c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch                              base::string16* horizontally_compact) OVERRIDE;
184a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const OVERRIDE;
1852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private:
1872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  const wallet::WalletItems::MaskedInstrument* instrument_;
188c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
189c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(WalletInstrumentWrapper);
1902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
1912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
192868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// A DataModelWrapper for FullWallet billing data.
1932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class FullWalletBillingWrapper : public DataModelWrapper {
1942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
1952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  explicit FullWalletBillingWrapper(wallet::FullWallet* full_wallet);
1962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual ~FullWalletBillingWrapper();
1972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
198c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
199c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual bool GetDisplayText(base::string16* vertically_compact,
200c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch                              base::string16* horizontally_compact) OVERRIDE;
201a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const OVERRIDE;
2022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
2032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private:
2042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  wallet::FullWallet* full_wallet_;
205c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
206c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(FullWalletBillingWrapper);
2072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
2082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
209868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// A DataModelWrapper for FullWallet shipping data.
2102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)class FullWalletShippingWrapper : public DataModelWrapper {
2112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) public:
2122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  explicit FullWalletShippingWrapper(wallet::FullWallet* full_wallet);
2132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  virtual ~FullWalletShippingWrapper();
2142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
215c2db58bd994c04d98e4ee2cd7565b71548655fe3Ben Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
216a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const OVERRIDE;
2172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
2182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) private:
2192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  wallet::FullWallet* full_wallet_;
220c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
221c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(FullWalletShippingWrapper);
2222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)};
2232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
224effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch// A DataModelWrapper for ::i18n::addressinput::AddressData objects.
225effb81e5f8246d0db0270817048dc992db66e9fbBen Murdochclass I18nAddressDataWrapper : public DataModelWrapper {
226effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch public:
227effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  explicit I18nAddressDataWrapper(
228effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch      const ::i18n::addressinput::AddressData* address);
229effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  virtual ~I18nAddressDataWrapper();
230effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
231effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  virtual base::string16 GetInfo(const AutofillType& type) const OVERRIDE;
232a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch  virtual const std::string& GetLanguageCode() const OVERRIDE;
233effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
234effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch private:
235effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  const ::i18n::addressinput::AddressData* address_;
236effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
237effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch  DISALLOW_COPY_AND_ASSIGN(I18nAddressDataWrapper);
238effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch};
239effb81e5f8246d0db0270817048dc992db66e9fbBen Murdoch
2402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}  // namespace autofill
2412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
2422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif  // CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_
243