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

Unified Diff: components/payments/payment_request.h

Issue 2621153002: [WebPayments] Add the Payment Method section in the Payment Sheet (Closed)
Patch Set: Reuse label. Created 3 years, 11 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
Index: components/payments/payment_request.h
diff --git a/components/payments/payment_request.h b/components/payments/payment_request.h
index cbd0e246ab9d79a501faffb3ef718c34844a093b..6f773f0174ed23cd9c14ce5e72dc67690369724b 100644
--- a/components/payments/payment_request.h
+++ b/components/payments/payment_request.h
@@ -10,6 +10,10 @@
#include "components/payments/payment_request.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
+namespace autofill {
+class CreditCard;
+}
+
namespace content {
class WebContents;
}
@@ -41,8 +45,13 @@ class PaymentRequest : payments::mojom::PaymentRequest {
void Cancel();
void OnError();
- payments::mojom::PaymentDetails* details() { return details_.get(); }
+ // Returns the currently selected credit card for this PaymentRequest flow.
+ // It's not guaranteed to be complete. Returns nullptr if there is no selected
+ // card.
+ autofill::CreditCard* GetCurrentlySelectedCreditCard();
+
+ payments::mojom::PaymentDetails* details() { return details_.get(); }
content::WebContents* web_contents() { return web_contents_; }
private:

Powered by Google App Engine
This is Rietveld 408576698