Index: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java |
index 35bf3cda88c5f67810ba107410c1743b55063608..be5b64a4b8ee06861dc79036f033fca823954216 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUI.java |
@@ -222,6 +222,7 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View |
private final Dialog mDialog; |
private final EditorView mEditorView; |
+ private final EditorView mCardEditorView; |
private final ViewGroup mFullContainer; |
private final ViewGroup mRequestView; |
private final PaymentRequestUiErrorView mErrorView; |
@@ -330,6 +331,7 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View |
mFullContainer.addView(mRequestView, bottomSheetParams); |
mEditorView = new EditorView(activity, sObserverForTest); |
+ mCardEditorView = new EditorView(activity, sObserverForTest); |
// Set up the dialog. |
mDialog = new AlwaysDismissedDialog(activity, R.style.DialogWhenLarge); |
@@ -445,7 +447,8 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View |
activity.getString(R.string.payments_contact_details_label), |
activity.getString(R.string.payments_select_contact_details_prompt), this); |
mPaymentMethodSection = new OptionSection(activity, |
- activity.getString(R.string.payments_method_of_payment_label), null, this); |
+ activity.getString(R.string.payments_method_of_payment_label), |
+ activity.getString(R.string.payments_select_method_of_payment_prompt), this); |
// Add the necessary sections to the layout. |
mPaymentContainerLayout.addView(mOrderSummarySection, new LinearLayout.LayoutParams( |
@@ -616,11 +619,17 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View |
updatePayButtonEnabled(); |
} |
- /** @return The editor user interface. */ |
+ /** @return The common editor user interface. */ |
public EditorView getEditorView() { |
return mEditorView; |
} |
+ /** @return The card editor user interface. Distinct from the common editor user interface, |
+ * because the credit card editor can launch the address editor. */ |
+ public EditorView getCardEditorView() { |
+ return mCardEditorView; |
+ } |
+ |
/** |
* Called when user clicks anything in the dialog. |
*/ |
@@ -1057,6 +1066,11 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View |
} |
@VisibleForTesting |
+ public ViewGroup getPaymentMethodSectionForTest() { |
+ return mPaymentMethodSection; |
+ } |
+ |
+ @VisibleForTesting |
public ViewGroup getContactDetailsSectionForTest() { |
return mContactDetailsSection; |
} |