| 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..b3e4d3e5bdfeb378a5312e5a1e89571b7148dae7 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,11 @@ 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.chrome.browser.payments.PaymentRequestImpl.PaymentRequestDisplayObserver;
|
| 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;
|
| @@ -24,7 +25,7 @@ import org.chromium.ui.base.WindowAndroid;
|
| * Creates instances of PaymentRequest.
|
| */
|
| public class PaymentRequestFactory
|
| - implements InterfaceFactory<PaymentRequest>, PaymentRequestDismissObserver {
|
| + implements InterfaceFactory<PaymentRequest>, PaymentRequestDisplayObserver {
|
| private final WebContents mWebContents;
|
| private boolean mIsPaymentRequestRunning;
|
|
|
| @@ -59,6 +60,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
|
| @@ -92,12 +100,16 @@ public class PaymentRequestFactory
|
| if (context == null) return new InvalidPaymentRequest();
|
|
|
| if (mIsPaymentRequestRunning) return new InvalidPaymentRequest();
|
| - mIsPaymentRequestRunning = true;
|
|
|
| return new PaymentRequestImpl(context, mWebContents, this);
|
| }
|
|
|
| @Override
|
| + public void onPaymentRequestDisplayed() {
|
| + mIsPaymentRequestRunning = true;
|
| + }
|
| +
|
| + @Override
|
| public void onPaymentRequestDismissed() {
|
| mIsPaymentRequestRunning = false;
|
| }
|
|
|