| Index: ash/frame/custom_frame_view_ash.cc
|
| diff --git a/ash/frame/custom_frame_view_ash.cc b/ash/frame/custom_frame_view_ash.cc
|
| index 8ab7e23be865b2ec1d9ec47dc7bcd44872aaf143..113983735927187cc4549668f45761a8b5976b72 100644
|
| --- a/ash/frame/custom_frame_view_ash.cc
|
| +++ b/ash/frame/custom_frame_view_ash.cc
|
| @@ -4,6 +4,9 @@
|
|
|
| #include "ash/frame/custom_frame_view_ash.h"
|
|
|
| +#include <algorithm>
|
| +#include <vector>
|
| +
|
| #include "ash/ash_switches.h"
|
| #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
|
| #include "ash/frame/caption_buttons/frame_maximize_button.h"
|
| @@ -154,6 +157,7 @@ class CustomFrameViewAsh::HeaderView
|
| // views::View:
|
| virtual void Layout() OVERRIDE;
|
| virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
|
| + virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
|
|
|
| // ShellObserver:
|
| virtual void OnMaximizeModeStarted() OVERRIDE;
|
| @@ -308,6 +312,17 @@ void CustomFrameViewAsh::HeaderView::OnPaint(gfx::Canvas* canvas) {
|
| header_painter_->PaintHeader(canvas, header_mode);
|
| }
|
|
|
| +void CustomFrameViewAsh::HeaderView::
|
| + ChildPreferredSizeChanged(views::View* child) {
|
| + // FrameCaptionButtonContainerView animates the visibility changes in
|
| + // UpdateSizeButtonVisibility(false). Due to this a new size is not available
|
| + // until the completion of the animation. Layout it response to the preferred
|
| + // size changes.
|
| + if (child != caption_button_container_)
|
| + return;
|
| + parent()->Layout();
|
| +}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // CustomFrameViewAsh::HeaderView, ShellObserver overrides:
|
|
|
|
|