Chromium Code Reviews| Index: components/payments/core/autofill_payment_instrument.h |
| diff --git a/components/payments/core/autofill_payment_instrument.h b/components/payments/core/autofill_payment_instrument.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e162f5045333fd9eb086f791ace2b47ee4e8a165 |
| --- /dev/null |
| +++ b/components/payments/core/autofill_payment_instrument.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ |
| +#define COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ |
| + |
| +#include <set> |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "components/autofill/core/browser/credit_card.h" |
| +#include "components/payments/core/payment_instrument.h" |
| + |
| +namespace autofill { |
| +class AutofillProfile; |
| +} |
| + |
| +namespace payments { |
| + |
| +// Represents an Autofill/Payments credit card form of payment in Payment |
| +// Request. |
| +class AutofillPaymentInstrument : public PaymentInstrument { |
| + public: |
| + AutofillPaymentInstrument( |
|
please use gerrit instead
2017/03/08 14:46:09
Mention that |billing_profiles| are owned by the c
Mathieu
2017/03/08 18:04:25
Done.
|
| + const std::string& method_name, |
| + const autofill::CreditCard& credit_card, |
| + const std::vector<autofill::AutofillProfile*>& billing_profiles, |
| + const std::string& app_locale); |
| + ~AutofillPaymentInstrument() override; |
| + |
| + // PaymentInstrument: |
| + void InvokePaymentApp(PaymentInstrument::Delegate* delegate) override; |
| + |
| + private: |
| + const autofill::CreditCard credit_card_; |
| + const std::vector<autofill::AutofillProfile*>& billing_profiles_; |
| + const std::string app_locale_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AutofillPaymentInstrument); |
| +}; |
| + |
| +} // namespace payments |
| + |
| +#endif // COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ |