[Payment Handler][Desktop] Show "Processing..." after response.
Before this patch, after a payment handler would send the payment
information response to the browser, the browser would continue showing
the payment handler page.
This patch shows a "Processing..." spinner when the browser receives the
payment response and sends it to the merchant website, if one is not
already showing (which could happen for non-interactive payment
handlers).
After this patch, the browser shows a "Processing..." spinner after
the payment handler responds with the payment information.
Bug: 922206
Change-Id: Ie38fd2e2b258af8d90975cc4570776930812f98a
Reviewed-on: https://chromium-review.googlesource.com/c/1447027
Commit-Queue: Rouslan Solomakhin <[email protected]>
Reviewed-by: Danyao Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#628130}
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc
index 967a875e..6b853dc 100644
--- a/components/payments/content/payment_request.cc
+++ b/components/payments/content/payment_request.cc
@@ -456,6 +456,13 @@
return;
}
+ // If currently interactive, show the processing spinner. Autofill payment
+ // instruments request a CVC, so they are always interactive at this point. A
+ // payment handler may elect to be non-interactive by not showing a
+ // confirmation page to the user.
+ if (delegate_->IsInteractive())
+ delegate_->ShowProcessingSpinner();
+
client_->OnPaymentResponse(std::move(response));
}