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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java

Issue 1268483004: Plumb the anonymize rect color to toolbar_layer from Tab#getThemeColor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tabHasThemeColor
Patch Set: Renamed BrandColorUtils in implementation Created 5 years, 4 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/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 a5b5afd412f17b3c7c93431f5fb055f7a8003034..5dcb7d74f62a3a1dc5dac7c15000a0ab825b5431 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
@@ -920,6 +920,9 @@ public class ToolbarPhone extends ToolbarLayout
mMenuButton.getHeight() - mMenuButton.getPaddingBottom());
translateCanvasToView(mToolbarButtonsContainer, mMenuButton, canvas);
mTabSwitcherAnimationMenuDrawable.setAlpha(rgbAlpha);
+ int color = mUseLightToolbarDrawables ? getResources().getColor(R.color.light_mode_tint)
+ : getResources().getColor(R.color.dark_mode_tint);
+ mTabSwitcherAnimationMenuDrawable.setColorFilter(color, PorterDuff.Mode.SRC_IN);
mTabSwitcherAnimationMenuDrawable.draw(canvas);
}
@@ -1644,8 +1647,6 @@ public class ToolbarPhone extends ToolbarLayout
@Override
protected void onPrimaryColorChanged() {
- if (!FeatureUtilities.isDocumentMode(getContext())) return;
-
super.onPrimaryColorChanged();
if (mBrandColorTransitionActive) mBrandColorTransitionAnimation.cancel();
if (!isVisualStateValidForBrandColorTransition(mVisualState)) {
@@ -1843,14 +1844,18 @@ public class ToolbarPhone extends ToolbarLayout
getProgressBar().setBackgroundColor(
getResources().getColor(progressBarBackgroundColorResource));
+ ColorStateList dark = getResources().getColorStateList(R.color.dark_mode_tint);
+ ColorStateList white = getResources().getColorStateList(R.color.light_mode_tint);
if (mToggleTabStackButton != null) {
mToggleTabStackButton.setImageDrawable(mUseLightToolbarDrawables
? mTabSwitcherButtonDrawableLight : mTabSwitcherButtonDrawable);
+ if (mTabSwitcherAnimationTabStackDrawable != null) {
+ mTabSwitcherAnimationTabStackDrawable.setTint(
+ mUseLightToolbarDrawables ? white : dark);
+ }
}
- ColorStateList dark = getResources().getColorStateList(R.color.dark_mode_tint);
- ColorStateList white = getResources().getColorStateList(R.color.light_mode_tint);
if (shouldShowMenuButton()) {
mMenuButton.setTint(mUseLightToolbarDrawables ? white : dark);
}

Powered by Google App Engine
This is Rietveld 408576698