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

Unified Diff: components/payments/content/payment_request_state.cc

Issue 2759253002: [Web Payments] Implement item selection in lists. (Closed)
Patch Set: Assert back navigation in browser tests. 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_state.cc
diff --git a/components/payments/content/payment_request_state.cc b/components/payments/content/payment_request_state.cc
index 01b95a3f38d3347b2eb323fe3fff9d192100c4e5..26e8bf3d5f951169ceec6af0171c6db8a08d4eee 100644
--- a/components/payments/content/payment_request_state.cc
+++ b/components/payments/content/payment_request_state.cc
@@ -4,6 +4,8 @@
#include "components/payments/content/payment_request_state.h"
+#include <set>
+
#include "components/autofill/core/browser/autofill_data_util.h"
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/credit_card.h"
@@ -60,6 +62,12 @@ void PaymentRequestState::GeneratePaymentResponse() {
selected_instrument_->InvokePaymentApp(this);
}
+void PaymentRequestState::SetSelectedShippingOption(
+ mojom::PaymentShippingOption* option) {
+ selected_shipping_option_ = option;
+ UpdateIsReadyToPayAndNotifyObservers();
+}
+
void PaymentRequestState::SetSelectedShippingProfile(
autofill::AutofillProfile* profile) {
selected_shipping_profile_ = profile;

Powered by Google App Engine
This is Rietveld 408576698