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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2315953002: Add theme color for Blimp on Android. (Closed)
Patch Set: Created 4 years, 3 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/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index aed2a38813d9f765ca133e032e47b8cbbf41da4e..a7d168b9483676312c38988e0dfef69e7c98a56e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -1114,6 +1114,11 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
if (themeColor != 0 && !ColorUtils.isValidThemeColor(themeColor)) themeColor = 0;
}
+ // Apply theme color for Blimp tab.
+ if (isBlimpTab() && getBlimpContents() != null) {
+ themeColor = getBlimpContents().getThemeColor();
David Trainor- moved to gerrit 2016/09/07 05:08:52 What does isValidThemeColor do? Do we need that?
nyquist 2016/09/07 15:11:04 Turns out it checks the HSL lightness value to be
xingliu 2016/09/07 17:23:36 Added isValidThemeColor check.
+ }
+
// Do not apply the theme color if there are any security issues on the page.
int securityLevel = getSecurityLevel();
if (securityLevel == ConnectionSecurityLevel.SECURITY_ERROR

Powered by Google App Engine
This is Rietveld 408576698