| 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 e5d6462ae79869fb2761cc9f4270d44e8c59558d..ac113a7fade22906552af6278c143adaf5a317b8 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
|
| @@ -7,10 +7,10 @@ package org.chromium.chrome.browser.payments;
|
| import android.app.Activity;
|
|
|
| import org.chromium.chrome.browser.ChromeFeatureList;
|
| -import org.chromium.chrome.browser.payments.PaymentRequestImpl.PaymentRequestDismissObserver;
|
| import org.chromium.content.browser.ContentViewCore;
|
| import org.chromium.content_public.browser.WebContents;
|
| import org.chromium.mojo.system.MojoException;
|
| +import org.chromium.payments.mojom.ActivePaymentQueryResult;
|
| import org.chromium.payments.mojom.PaymentDetails;
|
| import org.chromium.payments.mojom.PaymentErrorReason;
|
| import org.chromium.payments.mojom.PaymentMethodData;
|
| @@ -23,10 +23,8 @@ import org.chromium.ui.base.WindowAndroid;
|
| /**
|
| * Creates instances of PaymentRequest.
|
| */
|
| -public class PaymentRequestFactory
|
| - implements InterfaceFactory<PaymentRequest>, PaymentRequestDismissObserver {
|
| +public class PaymentRequestFactory implements InterfaceFactory<PaymentRequest> {
|
| private final WebContents mWebContents;
|
| - private boolean mIsPaymentRequestRunning;
|
|
|
| /**
|
| * An implementation of PaymentRequest that immediately rejects all connections.
|
| @@ -59,6 +57,13 @@ public class PaymentRequestFactory
|
| public void complete(int result) {}
|
|
|
| @Override
|
| + public void canMakeActivePayment() {
|
| + if (mClient != null) {
|
| + mClient.onCanMakeActivePayment(ActivePaymentQueryResult.CANNOT_MAKE_ACTIVE_PAYMENT);
|
| + }
|
| + }
|
| +
|
| + @Override
|
| public void close() {}
|
|
|
| @Override
|
| @@ -91,14 +96,6 @@ public class PaymentRequestFactory
|
| Activity context = window.getActivity().get();
|
| if (context == null) return new InvalidPaymentRequest();
|
|
|
| - if (mIsPaymentRequestRunning) return new InvalidPaymentRequest();
|
| - mIsPaymentRequestRunning = true;
|
| -
|
| - return new PaymentRequestImpl(context, mWebContents, this);
|
| - }
|
| -
|
| - @Override
|
| - public void onPaymentRequestDismissed() {
|
| - mIsPaymentRequestRunning = false;
|
| + return new PaymentRequestImpl(context, mWebContents);
|
| }
|
| }
|
|
|