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

Unified Diff: components/payments/payment_request.h

Issue 2621153002: [WebPayments] Add the Payment Method section in the Payment Sheet (Closed)
Patch Set: Fix BUILD.gn deps. 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
« no previous file with comments | « components/payments/DEPS ('k') | components/payments/payment_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/payment_request.h
diff --git a/components/payments/payment_request.h b/components/payments/payment_request.h
index 1a5f087d2855a88b79855e15e4610909842f788d..beb112050ed5030d9cbec0b30d8c03338beaee6e 100644
--- a/components/payments/payment_request.h
+++ b/components/payments/payment_request.h
@@ -12,6 +12,10 @@
#include "components/payments/payment_request.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
+namespace autofill {
+class CreditCard;
+}
+
namespace content {
class WebContents;
}
@@ -53,8 +57,12 @@ class PaymentRequest : payments::mojom::PaymentRequest {
const base::Optional<std::string> currency_system,
const std::string& locale_name);
- 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:
« no previous file with comments | « components/payments/DEPS ('k') | components/payments/payment_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698