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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java

Issue 2073603002: Add shippingOption to PaymentResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase #2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/test/data/android/payments/dynamic_shipping.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.payments; 5 package org.chromium.chrome.browser.payments;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.os.Handler; 9 import android.os.Handler;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 if (selectedShippingAddress != null) { 669 if (selectedShippingAddress != null) {
670 // Shipping addresses are created in show(). The should all be insta nces of 670 // Shipping addresses are created in show(). The should all be insta nces of
671 // AutofillAddress. 671 // AutofillAddress.
672 assert selectedShippingAddress instanceof AutofillAddress; 672 assert selectedShippingAddress instanceof AutofillAddress;
673 response.shippingAddress = 673 response.shippingAddress =
674 ((AutofillAddress) selectedShippingAddress).toPaymentAddress (); 674 ((AutofillAddress) selectedShippingAddress).toPaymentAddress ();
675 } 675 }
676 676
677 PaymentOption selectedShippingOption = mUiShippingOptions.getSelectedIte m(); 677 PaymentOption selectedShippingOption = mUiShippingOptions.getSelectedIte m();
678 if (selectedShippingOption != null && selectedShippingOption.getIdentifi er() != null) { 678 if (selectedShippingOption != null && selectedShippingOption.getIdentifi er() != null) {
679 response.shippingOptionId = selectedShippingOption.getIdentifier(); 679 response.shippingOption = selectedShippingOption.getIdentifier();
680 } 680 }
681 681
682 mClient.onPaymentResponse(response); 682 mClient.onPaymentResponse(response);
683 } 683 }
684 684
685 /** 685 /**
686 * Called if unable to retrieve instrument details. 686 * Called if unable to retrieve instrument details.
687 */ 687 */
688 @Override 688 @Override
689 public void onInstrumentDetailsError() { 689 public void onInstrumentDetailsError() {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 private void closeClient() { 725 private void closeClient() {
726 if (mClient != null) mClient.close(); 726 if (mClient != null) mClient.close();
727 mClient = null; 727 mClient = null;
728 } 728 }
729 729
730 @VisibleForTesting 730 @VisibleForTesting
731 public static void setObserverForTest(PaymentRequestServiceObserverForTest o bserverForTest) { 731 public static void setObserverForTest(PaymentRequestServiceObserverForTest o bserverForTest) {
732 sObserverForTest = observerForTest; 732 sObserverForTest = observerForTest;
733 } 733 }
734 } 734 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/android/payments/dynamic_shipping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698