Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java |
| index 4d539579922014188c6d820d477203c9e9b1591e..0f84346ef069c69f3a5887843796bd088a1cf2f1 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java |
| @@ -1987,6 +1987,14 @@ public class ToolbarPhone extends ToolbarLayout |
| boolean visualStateChanged = mVisualState != newVisualState; |
| int currentPrimaryColor = getToolbarDataProvider().getPrimaryColor(); |
| + int themeColorForProgressBar = currentPrimaryColor; |
| + |
| + // If The page is native force the use of the standard theme for the progress bar. |
| + if (getToolbarDataProvider() != null && getToolbarDataProvider().getTab() != null |
| + && getToolbarDataProvider().getTab().isNativePage()) { |
| + themeColorForProgressBar = getToolbarColorForVisualState(VisualState.NORMAL); |
|
Ted C
2016/06/24 16:19:06
What happens if you're on the incognito ntp?
mdjones
2016/06/24 17:05:28
The incognito flag is still passed into the functi
Ted C
2016/06/24 17:35:43
Acknowledged.
|
| + } |
| + |
| if (mVisualState == VisualState.BRAND_COLOR && !visualStateChanged) { |
| boolean useLightToolbarDrawables = |
| ColorUtils.shouldUseLightForegroundOnBackground(currentPrimaryColor); |
| @@ -1998,7 +2006,7 @@ public class ToolbarPhone extends ToolbarLayout |
| visualStateChanged = true; |
| } else { |
| updateToolbarBackground(VisualState.BRAND_COLOR); |
| - getProgressBar().setThemeColor(currentPrimaryColor, isIncognito()); |
| + getProgressBar().setThemeColor(themeColorForProgressBar, isIncognito()); |
| } |
| } |
| @@ -2018,7 +2026,7 @@ public class ToolbarPhone extends ToolbarLayout |
| mUnfocusedLocationBarUsesTransparentBg = false; |
| mUrlBackgroundAlpha = 255; |
| updateToolbarBackground(mVisualState); |
| - getProgressBar().setThemeColor(currentPrimaryColor, isIncognito()); |
| + getProgressBar().setThemeColor(themeColorForProgressBar, isIncognito()); |
| if (isInTabSwitcherMode) { |
| mUseLightToolbarDrawables = true; |