Commit 48844372 authored by Thomas Lukaszewicz's avatar Thomas Lukaszewicz Committed by Commit Bot

Tab Search: Show Tab Search only on Normal browser windows

Bug: 1140658
Change-Id: I77f676d076050fb49376166b376ba501244a3166
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495502Reviewed-by: default avatarTaylor Bergquist <tbergquist@chromium.org>
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820418}
parent 3ea6ea64
...@@ -739,9 +739,7 @@ int BrowserView::GetTabStripHeight() const { ...@@ -739,9 +739,7 @@ int BrowserView::GetTabStripHeight() const {
} }
TabSearchButton* BrowserView::GetTabSearchButton() { TabSearchButton* BrowserView::GetTabSearchButton() {
return base::FeatureList::IsEnabled(features::kTabSearch) return tab_strip_region_view_->tab_search_button();
? tab_strip_region_view_->tab_search_button()
: nullptr;
} }
bool BrowserView::IsTabStripVisible() const { bool BrowserView::IsTabStripVisible() const {
......
...@@ -115,7 +115,8 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip) { ...@@ -115,7 +115,8 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip) {
views::MaximumFlexSizeRule::kUnbounded)); views::MaximumFlexSizeRule::kUnbounded));
if (base::FeatureList::IsEnabled(features::kTabSearch) && if (base::FeatureList::IsEnabled(features::kTabSearch) &&
!tab_strip_->controller()->GetProfile()->IsIncognitoProfile()) { !tab_strip_->controller()->GetProfile()->IsIncognitoProfile() &&
tab_strip_->controller()->GetBrowser()->is_type_normal()) {
auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_); auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_);
tab_search_button->SetTooltipText( tab_search_button->SetTooltipText(
l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH)); l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH));
......
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