Commit 55b4eafa authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Use white borders in HTS incognito tab switcher

Bug: 887502
Change-Id: Ic6fd77dc9b067aabfbb22e50519e756fe1caa51f
Reviewed-on: https://chromium-review.googlesource.com/1252001Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595145}
parent 55503962
......@@ -13,6 +13,7 @@ import android.util.SparseArray;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.compositor.layouts.content.TitleBitmapFactory;
import org.chromium.chrome.browser.favicon.FaviconHelper;
import org.chromium.chrome.browser.favicon.FaviconHelper.DefaultFaviconHelper;
......@@ -120,7 +121,8 @@ public class LayerTitleCache implements TitleCache {
private String getUpdatedTitleInternal(Tab tab, String titleString,
boolean fetchFaviconFromHistory) {
final int tabId = tab.getId();
boolean isDarkTheme = tab.isIncognito();
boolean isDarkTheme = tab.isIncognito()
&& !ChromeFeatureList.isEnabled(ChromeFeatureList.HORIZONTAL_TAB_SWITCHER_ANDROID);
Bitmap originalFavicon = tab.getFavicon();
if (originalFavicon == null) {
originalFavicon = mDefaultFaviconHelper.getDefaultFaviconBitmap(
......
......@@ -65,6 +65,9 @@ public class TabListSceneLayer extends SceneLayer {
viewport.top, viewport.width(), viewport.height(), layerTitleCache,
tabContentManager, resourceManager);
boolean isHTSEnabled =
ChromeFeatureList.isEnabled(ChromeFeatureList.HORIZONTAL_TAB_SWITCHER_ANDROID);
for (int i = 0; i < tabsCount; i++) {
LayoutTab t = tabs[i];
assert t.isVisible() : "LayoutTab in that list should be visible";
......@@ -72,14 +75,14 @@ public class TabListSceneLayer extends SceneLayer {
float shadowAlpha = decoration / 2;
int urlBarBackgroundId = R.drawable.modern_location_bar;
boolean useLightIcon = t.isIncognito() && !isHTSEnabled;
int defaultThemeColor = ColorUtils.getDefaultThemeColor(res, t.isIncognito());
int defaultThemeColor = ColorUtils.getDefaultThemeColor(res, useLightIcon);
// In the modern design, the text box is always drawn opaque in the compositor.
float textBoxAlpha = 1.f;
int closeButtonColor =
ColorUtils.getThemedAssetColor(defaultThemeColor, t.isIncognito());
int closeButtonColor = ColorUtils.getThemedAssetColor(defaultThemeColor, useLightIcon);
int borderColorResource =
t.isIncognito() ? R.color.tab_back_incognito : R.color.tab_back;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment