| Index: components/payments/content/payment_request.cc
|
| diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc
|
| index aa9b1fb0dce703b91abeb398db3201e9e0ac8296..0569efcc79278e2be094adddec8fcf9076507e9b 100644
|
| --- a/components/payments/content/payment_request.cc
|
| +++ b/components/payments/content/payment_request.cc
|
| @@ -71,6 +71,16 @@ void PaymentRequest::Show() {
|
| delegate_->ShowDialog(this);
|
| }
|
|
|
| +void PaymentRequest::UpdateWith(mojom::PaymentDetailsPtr details) {
|
| + std::string error;
|
| + if (!payments::validatePaymentDetails(details, &error)) {
|
| + LOG(ERROR) << error;
|
| + OnConnectionTerminated();
|
| + return;
|
| + }
|
| + spec_->UpdateWith(std::move(details));
|
| +}
|
| +
|
| void PaymentRequest::Abort() {
|
| // The API user has decided to abort. We return a successful abort message to
|
| // the renderer, which closes the Mojo message pipe, which triggers
|
| @@ -112,6 +122,16 @@ void PaymentRequest::OnPaymentResponseAvailable(
|
| client_->OnPaymentResponse(std::move(response));
|
| }
|
|
|
| +void PaymentRequest::OnShippingOptionIdSelected(
|
| + std::string shipping_option_id) {
|
| + client_->OnShippingOptionChange(shipping_option_id);
|
| +}
|
| +
|
| +void PaymentRequest::OnShippingAddressSelected(
|
| + mojom::PaymentAddressPtr address) {
|
| + client_->OnShippingAddressChange(std::move(address));
|
| +}
|
| +
|
| void PaymentRequest::UserCancelled() {
|
| // If |client_| is not bound, then the object is already being destroyed as
|
| // a result of a renderer event.
|
|
|