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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_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: Make button layout animations generic 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: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
index 19d916148cd326f012dea84d4b5fa3150ac6025a..5bb5dd1d1eb4d02e9ac145537fbaedb3f837db74 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h"
+#include <algorithm>
+
#include "ash/ash_switches.h"
#include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
#include "ash/frame/default_header_painter.h"
@@ -377,6 +379,22 @@ gfx::ImageSkia BrowserNonClientFrameViewAsh::GetFaviconForTabIconView() {
}
///////////////////////////////////////////////////////////////////////////////
+// views::View:
+
+void
flackr 2014/05/09 14:15:14 Same comment about wrapping.
jonross 2014/05/09 14:45:47 Done.
+BrowserNonClientFrameViewAsh::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;
+ frame()->GetRootView()->Layout();
+}
+
+///////////////////////////////////////////////////////////////////////////////
// BrowserNonClientFrameViewAsh, private:
int BrowserNonClientFrameViewAsh::GetTabStripLeftInset() const {

Powered by Google App Engine
This is Rietveld 408576698