Commit a973f4f6 authored by Matthew Jones's avatar Matthew Jones Committed by Commit Bot

Allow ChromeActivity to enable the bottom toolbar via ToolbarManager

Bug: 852406
Change-Id: Iab6fc1125a0af2feed0c2c3d9918591f9b0bd332
Reviewed-on: https://chromium-review.googlesource.com/1099861
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568144}
parent 5c8d3722
...@@ -1429,6 +1429,8 @@ public class ChromeTabbedActivity ...@@ -1429,6 +1429,8 @@ public class ChromeTabbedActivity
super.initializeToolbar(); super.initializeToolbar();
if (isTablet()) { if (isTablet()) {
getToolbarManager().setShouldUpdateToolbarPrimaryColor(false); getToolbarManager().setShouldUpdateToolbarPrimaryColor(false);
} else if (FeatureUtilities.isBottomToolbarEnabled()) {
getToolbarManager().enableBottomToolbar();
} }
} }
......
...@@ -237,11 +237,6 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe ...@@ -237,11 +237,6 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe
HomepageManager.getInstance().addListener(mHomepageStateListener); HomepageManager.getInstance().addListener(mHomepageStateListener);
if (FeatureUtilities.isBottomToolbarEnabled()) {
mBottomToolbarController = new BottomToolbarController(
mActivity.getFullscreenManager(), mActivity.findViewById(R.id.coordinator));
}
mTabModelSelectorObserver = new EmptyTabModelSelectorObserver() { mTabModelSelectorObserver = new EmptyTabModelSelectorObserver() {
@Override @Override
public void onTabModelSelected(TabModel newModel, TabModel oldModel) { public void onTabModelSelected(TabModel newModel, TabModel oldModel) {
...@@ -600,6 +595,16 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe ...@@ -600,6 +595,16 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe
mLoadProgressSimulator = new LoadProgressSimulator(this); mLoadProgressSimulator = new LoadProgressSimulator(this);
} }
/**
* Enable the bottom toolbar.
*/
public void enableBottomToolbar() {
if (FeatureUtilities.isBottomToolbarEnabled()) {
mBottomToolbarController = new BottomToolbarController(
mActivity.getFullscreenManager(), mActivity.findViewById(R.id.coordinator));
}
}
/** /**
* Show the download page in-product-help bubble. Also used by download page screenshot IPH. * Show the download page in-product-help bubble. Also used by download page screenshot IPH.
* @param tab The current tab. * @param tab The current tab.
......
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