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

Unified Diff: components/payments/payment_request.h

Issue 2621153002: [WebPayments] Add the Payment Method section in the Payment Sheet (Closed)
Patch Set: Initial patch 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..59fa6d772e1a3a8748df5e72b869765af3d86a9b 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.
Mathieu 2017/01/12 21:27:11 wrap lines
anthonyvd 2017/01/13 16:09:19 Done.
+ 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