Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java |
index 314eebe2bd766bfa110b50a5931c18c92c441b49..18c19a233852a501439a1cbd63f65c919955f520 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java |
@@ -119,6 +119,21 @@ public class BottomToolbarPhone extends ToolbarPhone { |
context.getResources(), R.drawable.toolbar_handle_light); |
} |
+ /** |
+ * Set the color of the pull handle used by the toolbar. |
+ * @param useLight If the handle color should be light. |
+ */ |
+ public void updateHandleTint(boolean useLight) { |
+ mToolbarHandleView.setImageDrawable(useLight ? mHandleLight : mHandleDark); |
+ } |
+ |
+ /** |
+ * @return Whether or not the toolbar currently uses light drawables. |
+ */ |
+ public boolean usesLightDrawables() { |
+ return ColorUtils.shouldUseLightForegroundOnBackground(getTabThemeColor()); |
+ } |
+ |
@Override |
protected int getProgressBarTopMargin() { |
// In the case where the toolbar is at the bottom of the screen, the progress bar should |
@@ -235,8 +250,7 @@ public class BottomToolbarPhone extends ToolbarPhone { |
// The tab switcher's background color should not affect the toolbar handle; it should only |
// switch color based on the static tab's theme color. This is done so fade in/out looks |
// correct. |
- boolean isLight = ColorUtils.shouldUseLightForegroundOnBackground(getTabThemeColor()); |
- mToolbarHandleView.setImageDrawable(isLight ? mHandleLight : mHandleDark); |
+ mToolbarHandleView.setImageDrawable(usesLightDrawables() ? mHandleLight : mHandleDark); |
} |
@Override |