Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_non_client_frame_view.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc |
| index 44845e01404d0aa646c3e06942d07c8b36fa60ec..8f0064b64b950d2ff1396e876e5a767ea958a472 100644 |
| --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc |
| @@ -71,6 +71,21 @@ views::View* BrowserNonClientFrameView::GetProfileSwitcherView() const { |
| void BrowserNonClientFrameView::UpdateClientArea() {} |
| +void BrowserNonClientFrameView::ChildPreferredSizeChanged(views::View* child) { |
| + if (child == GetProfileSwitcherView()) { |
| + // Need to layout the root view here, too, as the avatar button may change |
|
Peter Kasting
2017/05/22 18:44:14
Nit: Not clear what "here, too," means in this con
Evan Stade
2017/05/22 20:32:48
Done.
|
| + // between the text and the icon when a profile is added or removed, which |
| + // changes its width. This may cause it to start or stop overlapping the |
| + // the tabstrip horizontally, which in turn causes it to change height, as |
| + // calculated in LayoutProfileSwitcher(). Calling LayoutProfileSwitcher() |
|
Peter Kasting
2017/05/22 18:44:15
Nit: LayoutProfileSwitcher() is not a member of th
Evan Stade
2017/05/22 20:32:48
I replaced this comment with the one we used to ha
|
| + // is not enough here - it does not re-draw the line below the tabstrip |
| + // properly when a profile is added or removed. Even adding |
| + // browser_view()->tabstrip()->Layout() and SchedulePaint() is not enough. |
| + // TODO(bsep): Figure out the most efficient way to do this. |
| + frame()->GetRootView()->Layout(); |
| + } |
| +} |
| + |
| void BrowserNonClientFrameView::VisibilityChanged(views::View* starting_from, |
| bool is_visible) { |
| // UpdateTaskbarDecoration() calls DrawTaskbarDecoration(), but that does |