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

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

Issue 2526943003: [Payments] Remove country from shipping label in bottom and fullsheet. (Closed)
Patch Set: Created 4 years, 1 month 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/ui/PaymentRequestSection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
index 896205dda70f5c91f6f781e7e790f7566b25d163..c7df45cb8a091c1844cc476eafb69745e343559c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java
@@ -35,6 +35,7 @@ import android.widget.TextView;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.R;
+import org.chromium.chrome.browser.payments.ui.PaymentOption.OptionSectionFocusChangedDelegate;
import org.chromium.chrome.browser.widget.DualControlLayout;
import org.chromium.chrome.browser.widget.TintedDrawable;
@@ -1076,6 +1077,8 @@ public abstract class PaymentRequestSection extends LinearLayout implements View
/** Indicates whether the summary should be a single line. */
private boolean mSummaryInSingleLine = false;
+ private OptionSectionFocusChangedDelegate mFocusChangedDelegate;
+
/**
* Constructs an OptionSection.
*
@@ -1092,6 +1095,16 @@ public abstract class PaymentRequestSection extends LinearLayout implements View
setSummaryText(null, null);
}
+ /**
+ * Registers the delegate to be notified when this OptionSection gains or loses focus.
+ *
+ * @param delegate The delegate to notify.
+ */
+ public void setOptionSectionFocusChangedDelegate(
+ OptionSectionFocusChangedDelegate delegate) {
+ mFocusChangedDelegate = delegate;
+ }
+
@Override
public void handleClick(View v) {
for (int i = 0; i < mOptionRows.size(); i++) {
@@ -1127,6 +1140,12 @@ public abstract class PaymentRequestSection extends LinearLayout implements View
return;
}
+ // Notify the observer that the focus is going to change.
+ if (mFocusChangedDelegate != null) {
+ mFocusChangedDelegate.onOptionSectionFocusChanged(
+ mSectionInformation.getDataType(), shouldFocus);
+ }
+
super.focusSection(shouldFocus);
}

Powered by Google App Engine
This is Rietveld 408576698