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

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

Issue 2250793003: Separate PaymentRequest initialization and display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update payment-request-mock.js Created 4 years, 4 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java » ('j') | 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/PaymentRequestFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
index 1bedddb631875bf5bb9d4a92d35302b6e98b62d9..1764acf8cddec3c124c61931d01b48052c24575a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java
@@ -33,17 +33,21 @@ public class PaymentRequestFactory implements ImplementationFactory<PaymentReque
* Necessary because Mojo does not handle null returned from createImpl().
*/
private static final class InvalidPaymentRequest implements PaymentRequest {
+ private PaymentRequestClient mClient;
+
@Override
- public void setClient(PaymentRequestClient client) {
- if (client != null) {
- client.onError(PaymentErrorReason.USER_CANCEL);
- client.close();
- }
+ public void init(PaymentRequestClient client, PaymentMethodData[] methodData,
+ PaymentDetails details, PaymentOptions options) {
+ mClient = client;
}
@Override
- public void show(PaymentMethodData[] methodData, PaymentDetails details,
- PaymentOptions options) {}
+ public void show() {
+ if (mClient != null) {
+ mClient.onError(PaymentErrorReason.USER_CANCEL);
+ mClient.close();
+ }
+ }
@Override
public void updateWith(PaymentDetails details) {}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698