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

Unified Diff: components/payments/content/payment_request.h

Issue 2744633002: [Web Payments] Add the shipping method section to the payment sheet (Closed)
Patch Set: 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
Index: components/payments/content/payment_request.h
diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h
index 7630c4289234c0218c0db7713f146d5bdb16ee4f..3d452ffc38ed495674d5d57b259323b27718550a 100644
--- a/components/payments/content/payment_request.h
+++ b/components/payments/content/payment_request.h
@@ -130,6 +130,10 @@ class PaymentRequest : public mojom::PaymentRequest,
// card.
autofill::CreditCard* selected_credit_card() { return selected_credit_card_; }
+ payments::mojom::PaymentShippingOption* selected_shipping_option() {
+ return selected_shipping_option_;
+ }
+
// Sets the |profile| to be the selected one and will update state and notify
// observers.
void SetSelectedShippingProfile(autofill::AutofillProfile* profile);
@@ -180,6 +184,8 @@ class PaymentRequest : public mojom::PaymentRequest,
// (contact info, shipping address).
bool ArePaymentOptionsSatisfied();
+ void UpdateSelectedShippingOptionFromDetails();
Mathieu 2017/03/09 19:07:03 Let's add a comment
anthonyvd 2017/03/09 19:43:55 Done.
+
content::WebContents* web_contents_;
std::unique_ptr<PaymentRequestDelegate> delegate_;
// |manager_| owns this PaymentRequest.
@@ -208,6 +214,7 @@ class PaymentRequest : public mojom::PaymentRequest,
std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_;
std::vector<autofill::CreditCard*> credit_cards_;
autofill::CreditCard* selected_credit_card_;
+ payments::mojom::PaymentShippingOption* selected_shipping_option_;
Mathieu 2017/03/09 19:07:03 Should we initialize this (and maybe other pointer
anthonyvd 2017/03/09 19:43:55 Done.
DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
};

Powered by Google App Engine
This is Rietveld 408576698