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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBar.java

Issue 1455353002: [InfoBars] Move links from tertiary buttons to links in the message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobar_main_layout
Patch Set: Comments Created 5 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/infobar/ConfirmInfoBar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBar.java
index 8810c2bd6eef92def86e48cad5bc3f7687420c49..cbdbba1775d90c93d2ab6fd61c87140c6223310c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBar.java
@@ -33,8 +33,8 @@ public class ConfirmInfoBar extends InfoBar {
/** Text shown on the secondary button, e.g. "Cancel".*/
private final String mSecondaryButtonText;
- /** Text shown on the extra button, e.g. "More info". */
- private final String mTertiaryButtonText;
+ /** Text shown on the link, e.g. "Learn more". */
+ private final String mLinkText;
/** Notified when one of the buttons is clicked. */
private final InfoBarListeners.Confirm mConfirmListener;
@@ -54,7 +54,7 @@ public class ConfirmInfoBar extends InfoBar {
super(confirmListener, iconDrawableId, iconBitmap, message);
mPrimaryButtonText = primaryButtonText;
mSecondaryButtonText = secondaryButtonText;
- mTertiaryButtonText = linkText;
+ mLinkText = linkText;
mConfirmListener = confirmListener;
}
@@ -77,7 +77,8 @@ public class ConfirmInfoBar extends InfoBar {
@Override
public void createContent(InfoBarLayout layout) {
- layout.setButtons(mPrimaryButtonText, mSecondaryButtonText, mTertiaryButtonText);
+ layout.setButtons(mPrimaryButtonText, mSecondaryButtonText);
+ if (mLinkText != null) layout.setMessageLinkText(mLinkText);
}
private static boolean hasPermission(Context context, String permission) {
« no previous file with comments | « chrome/android/java/res/values/ids.xml ('k') | chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698