Commit 26650a25 authored by Collin Baker's avatar Collin Baker Committed by Commit Bot

Move WebUITabStripContainerView to TopContainerView

Bug: 1003122
Change-Id: Ic1301579a3eff6a418bf5a8c3cea7d3938fd5085
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809411
Commit-Queue: Collin Baker <collinbaker@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Auto-Submit: Collin Baker <collinbaker@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697407}
parent 64804798
......@@ -2583,6 +2583,20 @@ void BrowserView::InitViews() {
top_container_->AddChildView(toolbar_);
toolbar_->Init();
views::View* webui_tab_strip_view = nullptr;
views::View* webui_tab_strip_caption_buttons = nullptr;
#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
if (base::FeatureList::IsEnabled(features::kWebUITabStrip)) {
WebUITabStripContainerView* const webui_tab_strip =
top_container_->AddChildView(
std::make_unique<WebUITabStripContainerView>(browser_.get()));
webui_tab_strip_caption_buttons =
top_container_->AddChildView(webui_tab_strip->CreateControlButtons());
webui_tab_strip_view = webui_tab_strip;
}
#endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
// This browser view may already have a custom button provider set (e.g the
// hosted app frame).
if (!toolbar_button_provider_)
......@@ -2622,19 +2636,6 @@ void BrowserView::InitViews() {
immersive_mode_controller_->Init(this);
immersive_mode_controller_->AddObserver(this);
views::View* webui_tab_strip_view = nullptr;
views::View* webui_tab_strip_caption_buttons = nullptr;
#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
if (base::FeatureList::IsEnabled(features::kWebUITabStrip)) {
WebUITabStripContainerView* const webui_tab_strip = AddChildView(
std::make_unique<WebUITabStripContainerView>(browser_.get()));
webui_tab_strip_caption_buttons =
AddChildView(webui_tab_strip->CreateControlButtons());
webui_tab_strip_view = webui_tab_strip;
}
#endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
// See https://crbug.com/993502.
views::View* web_footer_experiment = nullptr;
if (base::FeatureList::IsEnabled(features::kWebFooterExperiment)) {
......
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