| Index: chrome/browser/ui/autofill/data_model_wrapper.h
|
| diff --git a/chrome/browser/ui/autofill/data_model_wrapper.h b/chrome/browser/ui/autofill/data_model_wrapper.h
|
| index d4a5c8a5ff648667363b482d5c14aaa327f5192f..22a6ea61d41d8cd7524fb91863310e2e06a4e640 100644
|
| --- a/chrome/browser/ui/autofill/data_model_wrapper.h
|
| +++ b/chrome/browser/ui/autofill/data_model_wrapper.h
|
| @@ -20,12 +20,13 @@ namespace gfx {
|
| class Image;
|
| }
|
|
|
| +namespace autofill {
|
| +
|
| namespace wallet {
|
| class Address;
|
| +class FullWallet;
|
| }
|
|
|
| -namespace autofill {
|
| -
|
| // A glue class that allows uniform interactions with autocomplete data sources,
|
| // regardless of their type. Implementations are intended to be lightweight and
|
| // copyable, only holding weak references to their backing model.
|
| @@ -41,7 +42,7 @@ class DataModelWrapper {
|
|
|
| // Fills in |inputs| with the data that this model contains (|inputs| is an
|
| // out-param).
|
| - virtual void FillInputs(DetailInputs* inputs) = 0;
|
| + virtual void FillInputs(DetailInputs* inputs);
|
|
|
| // Returns text to display to the user to summarize this data source. The
|
| // default implementation assumes this is an address.
|
| @@ -116,7 +117,6 @@ class WalletAddressWrapper : public DataModelWrapper {
|
|
|
| virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
|
| virtual gfx::Image GetIcon() OVERRIDE;
|
| - virtual void FillInputs(DetailInputs* inputs) OVERRIDE;
|
|
|
| protected:
|
| virtual void FillFormField(AutofillField* field) OVERRIDE;
|
| @@ -134,7 +134,6 @@ class WalletInstrumentWrapper : public DataModelWrapper {
|
|
|
| virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
|
| virtual gfx::Image GetIcon() OVERRIDE;
|
| - virtual void FillInputs(DetailInputs* inputs) OVERRIDE;
|
| virtual string16 GetDisplayText() OVERRIDE;
|
|
|
| protected:
|
| @@ -144,6 +143,37 @@ class WalletInstrumentWrapper : public DataModelWrapper {
|
| const wallet::WalletItems::MaskedInstrument* instrument_;
|
| };
|
|
|
| -}
|
| +// A DataModelWrapper for FullWallets.
|
| +class FullWalletWrapper : public DataModelWrapper {
|
| + public:
|
| + explicit FullWalletWrapper(wallet::FullWallet* full_wallet);
|
| + virtual ~FullWalletWrapper();
|
| +
|
| + virtual string16 GetInfo(AutofillFieldType type) OVERRIDE;
|
| + virtual gfx::Image GetIcon() OVERRIDE;
|
| +
|
| + protected:
|
| + virtual bool IsBillingWrapper() const = 0;
|
| + virtual void FillFormField(AutofillField* field) OVERRIDE;
|
| +
|
| + private:
|
| + wallet::FullWallet* full_wallet_;
|
| +};
|
| +
|
| +class FullWalletBillingWrapper : public FullWalletWrapper {
|
| + public:
|
| + explicit FullWalletBillingWrapper(wallet::FullWallet* full_wallet);
|
| + virtual ~FullWalletBillingWrapper();
|
| + virtual bool IsBillingWrapper() const OVERRIDE;
|
| +};
|
| +
|
| +class FullWalletShippingWrapper : public FullWalletWrapper {
|
| + public:
|
| + explicit FullWalletShippingWrapper(wallet::FullWallet* full_wallet);
|
| + virtual ~FullWalletShippingWrapper();
|
| + virtual bool IsBillingWrapper() const OVERRIDE;
|
| +};
|
| +
|
| +} // namespace autofill
|
|
|
| #endif // CHROME_BROWSER_UI_AUTOFILL_DATA_MODEL_WRAPPER_H_
|
|
|