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

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

Issue 2059073002: Add "Checking" spinner for server-side shipping address validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use existing color Created 4 years, 6 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: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java
index 70dd3de8c9eb1eaa5de0fa59f9db250d5f30fe4c..a72383fa85be3af127cfdb350b837216b504e180 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentInformation.java
@@ -5,40 +5,37 @@
package org.chromium.chrome.browser.payments.ui;
/**
- * The data to show in the PaymentRequest UI when first showing the UI.
+ * The data to show in the PaymentRequest UI.
*/
public class PaymentInformation {
- private final LineItem mTotal;
+ private final ShoppingCart mShoppingCart;
private final SectionInformation mShippingAddresses;
private final SectionInformation mShippingOptions;
private final SectionInformation mPaymentMethods;
/**
- * Builds the default payment information to show in the initial PaymentRequest view.
+ * Builds the payment information to show in the PaymentRequest view.
*
- * @param totalPrice The total price.
- * @param defaultShippingAddress The default shipping address.
- * @param defaultShippingOption The default shipping option.
- * @param defaultPaymentMethod The default payment method.
- */
- public PaymentInformation(LineItem totalPrice, PaymentOption defaultShippingAddress,
- PaymentOption defaultShippingOption, PaymentOption defaultPaymentMethod) {
- mTotal = totalPrice;
- mShippingAddresses = new SectionInformation(
- PaymentRequestUI.TYPE_SHIPPING_ADDRESSES, defaultShippingAddress);
- mShippingOptions = new SectionInformation(
- PaymentRequestUI.TYPE_SHIPPING_OPTIONS, defaultShippingOption);
- mPaymentMethods = new SectionInformation(
- PaymentRequestUI.TYPE_PAYMENT_METHODS, defaultPaymentMethod);
+ * @param shoppingCart The shopping cart.
+ * @param sippingAddresses The shipping addresses.
+ * @param shippingOptions The shipping options.
+ * @param paymentMethods The payment methods.
+ */
+ public PaymentInformation(ShoppingCart shoppingCart, SectionInformation shippingAddresses,
+ SectionInformation shippingOptions, SectionInformation paymentMethods) {
+ mShoppingCart = shoppingCart;
+ mShippingAddresses = shippingAddresses;
+ mShippingOptions = shippingOptions;
+ mPaymentMethods = paymentMethods;
}
/**
- * Returns the total price on the bill.
+ * Returns the shopping cart.
*
- * @return The total price on the bill.
+ * @return The shopping cart.
*/
- public LineItem getTotal() {
- return mTotal;
+ public ShoppingCart getShoppingCart() {
+ return mShoppingCart;
}
/**

Powered by Google App Engine
This is Rietveld 408576698