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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java

Issue 2140413002: Hide PaymentRequest UI spinner during CVC unmask (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Show the processing spinner while the website is processing the payment. Created 4 years, 5 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 | « chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
index 35bf3cda88c5f67810ba107410c1743b55063608..f3c0795a37145c6e2162d6bbbb726738896e44fc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java
@@ -137,10 +137,10 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
@DataType int optionType, Callback<PaymentInformation> checkedCallback);
/**
- * Called when the user clicks on the “Pay” button. At this point, the UI is disabled and is
- * showing a spinner.
+ * Called when the user clicks on the “Pay” button. If this method returns true, the UI is
+ * disabled and is showing a spinner. Otherwise, the UI is hidden.
*/
- void onPayClicked(PaymentOption selectedShippingAddress,
+ boolean onPayClicked(PaymentOption selectedShippingAddress,
PaymentOption selectedShippingOption, PaymentOption selectedPaymentMethod);
/**
@@ -688,12 +688,24 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
params.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
mRequestView.requestLayout();
- mClient.onPayClicked(
+ boolean showSpinner = mClient.onPayClicked(
mShippingAddressSectionInformation == null
? null : mShippingAddressSectionInformation.getSelectedItem(),
mShippingOptionsSectionInformation == null
? null : mShippingOptionsSectionInformation.getSelectedItem(),
mPaymentMethodSectionInformation.getSelectedItem());
+
+ if (!showSpinner) mDialog.hide();
+ }
+
+ /**
+ * Called when the user has sent the payment information to the website, which is now processing
+ * the payment.
+ */
+ public void showProcessingMessage() {
+ assert mIsProcessingPayClicked;
+ mIsProcessingPayClicked = false;
+ mDialog.show();
}
private void updatePayButtonEnabled() {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698