Chromium Code Reviews| Index: components/payments/content/android/java/src/org/chromium/components/payments/PaymentManifestDownloader.java |
| diff --git a/components/payments/content/android/java/src/org/chromium/components/payments/PaymentManifestDownloader.java b/components/payments/content/android/java/src/org/chromium/components/payments/PaymentManifestDownloader.java |
| index 0139ac624c5adb4832b0e7576306fec1634f7ff2..4bc45ddbfd30251d12cec3df79f650b830a62976 100644 |
| --- a/components/payments/content/android/java/src/org/chromium/components/payments/PaymentManifestDownloader.java |
| +++ b/components/payments/content/android/java/src/org/chromium/components/payments/PaymentManifestDownloader.java |
| @@ -24,9 +24,17 @@ public class PaymentManifestDownloader { |
| * @param contents The successfully downloaded payment method manifest. |
| */ |
| @CalledByNative("ManifestDownloadCallback") |
| - void onManifestDownloadSuccess(String contents); |
| + void onPaymentMethodManifestDownloadSuccess(String content); |
| - /** Called on failed download of a payment method manifest. */ |
| + /** |
| + * Called on successful download of a web app manifest. |
| + * |
| + * @param contents The successfully downloaded web app manifest. |
|
gogerald1
2017/04/07 19:36:16
content
please use gerrit instead
2017/04/08 18:54:48
Done.
|
| + */ |
| + @CalledByNative("ManifestDownloadCallback") |
| + void onWebAppManifestDownloadSuccess(String content); |
| + |
| + /** Called on failed download. */ |
| @CalledByNative("ManifestDownloadCallback") |
| void onManifestDownloadFailure(); |
| } |
| @@ -44,13 +52,23 @@ public class PaymentManifestDownloader { |
| } |
| /** |
| - * Downloads the manifest file asynchronously. |
| + * Downloads the payment method manifest file asynchronously. |
| * |
| * @param methodName The payment method name that is a URI with HTTPS scheme. |
| * @param callback The callback to invoke when finished downloading. |
| */ |
| - public void download(URI methodName, ManifestDownloadCallback callback) { |
| - nativeDownloadPaymentManifest(mWebContents, methodName, callback); |
| + public void downloadPaymentMethodManifest(URI methodName, ManifestDownloadCallback callback) { |
| + nativeDownloadPaymentMethodManifest(mWebContents, methodName, callback); |
| + } |
| + |
| + /** |
| + * Downloads the web app manifest file asynchronously. |
| + * |
| + * @param webAppmanifestUri The web app manifest URI with HTTPS scheme. |
| + * @param callback The callback to invoke when finished downloading. |
| + */ |
| + public void downloadWebAppManifest(URI webAppManifestUri, ManifestDownloadCallback callback) { |
| + nativeDownloadWebAppManifest(mWebContents, webAppManifestUri, callback); |
| } |
| @CalledByNative |
| @@ -58,6 +76,8 @@ public class PaymentManifestDownloader { |
| return methodName.toString(); |
| } |
| - private static native void nativeDownloadPaymentManifest( |
| + private static native void nativeDownloadPaymentMethodManifest( |
| + WebContents webContents, URI methodName, ManifestDownloadCallback callback); |
| + private static native void nativeDownloadWebAppManifest( |
| WebContents webContents, URI methodName, ManifestDownloadCallback callback); |
| } |