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

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

Issue 2698703003: [Payments] Add UI elements to secure branding for payments (Closed)
Patch Set: Created 3 years, 10 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/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 731136017ac9f84aca7b1efc0f4fcc80a2cf2ba6..acd6eb1ebf0b28709ed1cb394cd13a2b9790e4e5 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
@@ -52,9 +52,11 @@ import org.chromium.chrome.browser.payments.ui.PaymentRequestSection.OptionSecti
import org.chromium.chrome.browser.payments.ui.PaymentRequestSection.SectionSeparator;
import org.chromium.chrome.browser.widget.AlwaysDismissedDialog;
import org.chromium.chrome.browser.widget.DualControlLayout;
+import org.chromium.chrome.browser.widget.TintedDrawable;
import org.chromium.chrome.browser.widget.animation.AnimatorProperties;
import org.chromium.chrome.browser.widget.animation.FocusAnimator;
import org.chromium.components.signin.ChromeSigninController;
+import org.chromium.components.url_formatter.UrlFormatter;
import org.chromium.ui.text.NoUnderlineClickableSpan;
import org.chromium.ui.text.SpanApplier;
import org.chromium.ui.text.SpanApplier.SpanInfo;
@@ -543,7 +545,14 @@ public class PaymentRequestUI implements DialogInterface.OnDismissListener, View
messageView.setText(R.string.payments_loading_message);
((TextView) mRequestView.findViewById(R.id.page_title)).setText(title);
- ((TextView) mRequestView.findViewById(R.id.hostname)).setText(origin);
+
+ TextView hostName = (TextView) mRequestView.findViewById(R.id.hostname);
+ hostName.setText(UrlFormatter.tintUrlSchemeForSecurityDisplay(origin,
+ ApiCompatibilityUtils.getColor(context.getResources(), R.color.google_green_700)));
+ ApiCompatibilityUtils.setCompoundDrawablesRelativeWithIntrinsicBounds(hostName,
please use gerrit instead 2017/02/15 21:54:46 Also, let's not show the lock icon for non-https.
gogerald1 2017/02/16 16:43:14 Done. Unfortunately, we can not simply use omnibox
+ TintedDrawable.constructTintedDrawable(context.getResources(),
+ R.drawable.omnibox_https_valid, R.color.google_green_700),
+ null, null, null);
// Set up the buttons.
mCloseButton = mRequestView.findViewById(R.id.close_button);

Powered by Google App Engine
This is Rietveld 408576698