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

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

Issue 2436363002: [Reland] Make PaymentOption store a Drawable instead of id (Closed)
Patch Set: Fix integraiton test Created 4 years, 2 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
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
index 69681e9fa519d71f7212d87263cbd26d3e0f5094..7430f597742a9bb689ecedb1f6bfff15e782da21 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentAppFactory.java
@@ -4,6 +4,8 @@
package org.chromium.chrome.browser.payments;
+import android.content.Context;
+
import org.chromium.base.VisibleForTesting;
import org.chromium.content_public.browser.WebContents;
@@ -26,8 +28,11 @@ public class PaymentAppFactory {
public interface PaymentAppFactoryAddition {
/**
* Builds instances of payment apps.
+ *
+ * @param context The application context.
+ * @param webContents The web contents that invoked PaymentRequest.
*/
- List<PaymentApp> create(WebContents webContents);
+ List<PaymentApp> create(Context context, WebContents webContents);
}
/**
@@ -45,10 +50,13 @@ public class PaymentAppFactory {
*
* @param webContents The web contents where PaymentRequest was invoked.
*/
- public static List<PaymentApp> create(WebContents webContents) {
+ public static List<PaymentApp> create(Context context, WebContents webContents) {
List<PaymentApp> result = new ArrayList<>(2);
- result.add(new AutofillPaymentApp(webContents));
- if (sAdditionalFactory != null) result.addAll(sAdditionalFactory.create(webContents));
+ result.add(new AutofillPaymentApp(context, webContents));
+ if (sAdditionalFactory != null) {
+ result.addAll(
+ sAdditionalFactory.create(context, webContents));
+ }
return result;
}
}

Powered by Google App Engine
This is Rietveld 408576698