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

Unified Diff: components/payments/payment_request.h

Issue 2625183002: [WebPayments] Adding Shipping Address and Contact Info display to order summary (Closed)
Patch Set: sky comments 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/autofill_strings.grdp ('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 beb112050ed5030d9cbec0b30d8c03338beaee6e..6c55cca9ae4910cb4377dfa08fdf5251239c8fc6 100644
--- a/components/payments/payment_request.h
+++ b/components/payments/payment_request.h
@@ -6,13 +6,15 @@
#define COMPONENTS_PAYMENTS_PAYMENT_REQUEST_H_
#include <memory>
+#include <string>
+#include <vector>
-#include "base/optional.h"
#include "components/payments/currency_formatter.h"
#include "components/payments/payment_request.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace autofill {
+class AutofillProfile;
class CreditCard;
}
@@ -57,6 +59,13 @@ class PaymentRequest : payments::mojom::PaymentRequest {
const base::Optional<std::string> currency_system,
const std::string& locale_name);
+ // Returns the Autofill Profile, representing the shipping address and contact
+ // information, currently selected for this PaymentRequest flow. If
+ // unpopulated, populates with and returns the 0th profile on record for this
+ // user, if it exists; or nullptr otherwise. Profile is owned by the request
+ // object, not the caller.
+ autofill::AutofillProfile* GetCurrentlySelectedProfile();
+
// 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.
@@ -74,6 +83,7 @@ class PaymentRequest : payments::mojom::PaymentRequest {
payments::mojom::PaymentRequestClientPtr client_;
payments::mojom::PaymentDetailsPtr details_;
std::unique_ptr<CurrencyFormatter> currency_formatter_;
+ std::unique_ptr<autofill::AutofillProfile> profile_;
DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
};
« no previous file with comments | « components/autofill_strings.grdp ('k') | components/payments/payment_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698