Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1645)

Unified Diff: ash/frame/custom_frame_view_ash.cc

Issue 271913002: Animate window control changes in TouchView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..86af09c80ff0f75493f53cbe7373c42baa1d8be5 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>
flackr 2014/05/08 19:02:21 not used?
jonross 2014/05/08 21:15:40 Cpplint, used outside my changed.
+#include <vector>
flackr 2014/05/08 19:02:21 not used?
jonross 2014/05/08 21:15:40 Cpplint, used outside my changed.
+
#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,13 @@ void CustomFrameViewAsh::HeaderView::OnPaint(gfx::Canvas* canvas) {
header_painter_->PaintHeader(canvas, header_mode);
}
+void
+CustomFrameViewAsh::HeaderView::ChildPreferredSizeChanged(views::View* child) {
+ if (child != caption_button_container_)
flackr 2014/05/08 19:02:21 Comment why.
jonross 2014/05/08 21:15:40 Done.
+ return;
+ parent()->Layout();
+}
+
///////////////////////////////////////////////////////////////////////////////
// CustomFrameViewAsh::HeaderView, ShellObserver overrides:

Powered by Google App Engine
This is Rietveld 408576698