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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUiErrorView.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/PaymentRequestUiErrorView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUiErrorView.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUiErrorView.java
index 12097c088fd4d30ab7208eb769b7603faa3c774d..aebe4dc7c194616c920c0ddf144eddad82d61bc6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUiErrorView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestUiErrorView.java
@@ -17,6 +17,8 @@ import android.widget.TextView;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.widget.BoundedLinearLayout;
+import org.chromium.chrome.browser.widget.TintedDrawable;
+import org.chromium.components.url_formatter.UrlFormatter;
/**
* Displays the status of a payment request to the user.
@@ -35,7 +37,15 @@ public class PaymentRequestUiErrorView extends BoundedLinearLayout {
*/
public void initialize(String title, String origin) {
((TextView) findViewById(R.id.page_title)).setText(title);
- ((TextView) findViewById(R.id.hostname)).setText(origin);
+
+ TextView hostName = (TextView) findViewById(R.id.hostname);
+ hostName.setText(UrlFormatter.tintUrlSchemeForSecurityDisplay(
+ origin, ApiCompatibilityUtils.getColor(
+ getContext().getResources(), R.color.google_green_700)));
+ ApiCompatibilityUtils.setCompoundDrawablesRelativeWithIntrinsicBounds(hostName,
+ TintedDrawable.constructTintedDrawable(getContext().getResources(),
+ R.drawable.omnibox_https_valid, R.color.google_green_700),
+ null, null, null);
// Remove the close button, then expand the page information to take up the space formerly
// occupied by the X.

Powered by Google App Engine
This is Rietveld 408576698