|
122 | 122 | // TODO(pbos): Investigate whether the side panels should be creatable when |
123 | 123 | --- a/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc |
124 | 124 | +++ b/chrome/browser/ui/views/frame/layout/browser_view_layout_impl_old.cc |
125 | | -@@ -411,6 +411,13 @@ void BrowserViewLayoutImplOld::LayoutTab |
126 | | - views().tab_strip_region_view->SetBounds(0, 0, 0, 0); |
127 | | - return; |
128 | | - } |
| 125 | +@@ -406,6 +406,15 @@ void BrowserViewLayoutImplOld::LayoutVer |
| 126 | + void BrowserViewLayoutImplOld::LayoutTabStripRegion( |
| 127 | + gfx::Rect& available_bounds) { |
| 128 | + TRACE_EVENT0("ui", "BrowserViewLayout::LayoutTabStripRegion"); |
129 | 129 | + |
130 | | -+ // If the CAT feature is enabled, then the tab strip is in the toolbar. |
131 | | -+ // We shouldn't layout it here. |
132 | | -+ if (features::IsHeliumCatEnabled()) { |
| 130 | ++ // If the CAT feature is enabled and we're in a normal browser, |
| 131 | ++ // skip laying out the tab strip region. It's laid out in the toolbar. |
| 132 | ++ // In other browser types the tab strip isn't drawn, so the next |
| 133 | ++ // if statement will hide it. |
| 134 | ++ if (features::IsHeliumCatEnabled() && browser()->is_type_normal()) { |
133 | 135 | + return; |
134 | 136 | + } |
135 | 137 | + |
136 | | - // This retrieves the bounds for the tab strip based on whether or not we show |
137 | | - // anything to the left of it, like the incognito avatar. |
138 | | - gfx::Rect tab_strip_region_bounds( |
139 | | -@@ -458,6 +465,15 @@ void BrowserViewLayoutImplOld::LayoutToo |
| 138 | + if (!delegate().ShouldDrawTabStrip()) { |
| 139 | + SetViewVisibility(views().tab_strip_region_view, false); |
| 140 | + views().tab_strip_region_view->SetBounds(0, 0, 0, 0); |
| 141 | +@@ -458,6 +467,15 @@ void BrowserViewLayoutImplOld::LayoutToo |
140 | 142 | toolbar_bounds.set_x(available_bounds.x()); |
141 | 143 | toolbar_bounds.set_width(toolbar_bounds.width() - kVerticalTabStripWidth); |
142 | 144 | views().toolbar->SetBoundsRect(toolbar_bounds); |
|
0 commit comments