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

Unified Diff: components/payments/core/autofill_payment_instrument.h

Issue 2733953003: [Payments] Return a basic card response (Closed)
Patch Set: addressed comments from anthony Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/payments/core/BUILD.gn ('k') | components/payments/core/autofill_payment_instrument.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d6d9ec6c60d23f81d911b23de2015d3a6cf7e964
--- /dev/null
+++ b/components/payments/core/autofill_payment_instrument.h
@@ -0,0 +1,47 @@
+// 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:
+ // |billing_profiles| is owned by the caller and should outlive this object.
+ AutofillPaymentInstrument(
+ 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_
« no previous file with comments | « components/payments/core/BUILD.gn ('k') | components/payments/core/autofill_payment_instrument.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698