Commit fcb1b54d authored by gogerald's avatar gogerald Committed by Commit Bot

[StartSurface] Hide the top tab switcher toolbar on the explore surface

The screenshot:
https://drive.google.com/file/d/1hFwKWKo8fVp9BvxX6i7FClsguEidiXZs/view?usp=sharing

Bug: 982018
Change-Id: I4901d1e5dc34540c0d445ec5f73fc1017a1abef4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724652
Auto-Submit: Ganggui Tang <gogerald@chromium.org>
Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681820}
parent 9105ef45
......@@ -7,6 +7,8 @@ package org.chromium.chrome.features.start_surface;
import static org.chromium.chrome.features.start_surface.StartSurfaceProperties.BOTTOM_BAR_HEIGHT;
import static org.chromium.chrome.features.start_surface.StartSurfaceProperties.TOP_BAR_HEIGHT;
import android.view.ViewGroup;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.ChromeFeatureList;
......@@ -47,8 +49,8 @@ public class StartSurfaceCoordinator implements StartSurface {
int singleToolbarHeight =
activity.getResources().getDimensionPixelSize(R.dimen.toolbar_height_no_shadow);
int toolbarHeight = ReturnToChromeExperimentsUtil.shouldShowOmniboxOnTabSwitcher()
? singleToolbarHeight * 2
: singleToolbarHeight;
? singleToolbarHeight
: 0;
mPropertyModel.set(TOP_BAR_HEIGHT, toolbarHeight);
// Create the bottom bar.
......@@ -56,8 +58,12 @@ public class StartSurfaceCoordinator implements StartSurface {
activity, activity.getCompositorViewHolder(), mPropertyModel);
// Create the explore surface.
// TODO(crbug.com/982018): This is a hack to hide the top tab switcher toolbar in
// the explore surface. Remove it after deciding on where to put the omnibox.
ViewGroup exploreSurfaceContainer =
(ViewGroup) activity.getCompositorViewHolder().getParent();
mExploreSurfaceCoordinator = new ExploreSurfaceCoordinator(
activity, activity.getCompositorViewHolder(), mPropertyModel);
activity, exploreSurfaceContainer, mPropertyModel);
}
mStartSurfaceMediator = new StartSurfaceMediator(mGridTabSwitcher.getGridController(),
......
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