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

Unified Diff: chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc

Issue 10444014: ash: Improved window maximize/restore animations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix workspace mgr, remove ignore_window, cleanup Created 8 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/ash/browser_non_client_frame_view_ash.cc
diff --git a/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc
index 5fa52f759788a6a856e1f4671dd69b32074a9d49..6ebb0eb7aea7a3f6d26469fe25ff30737f59d209 100644
--- a/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc
+++ b/chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc
@@ -315,6 +315,11 @@ gfx::Size BrowserNonClientFrameViewAsh::GetMinimumSize() {
void BrowserNonClientFrameViewAsh::ButtonPressed(views::Button* sender,
const views::Event& event) {
+ // Optionally slow down animations for visual testing.
Ben Goodger (Google) 2012/05/29 22:30:45 Hrm, this is useful. Do you think you could extrac
+ bool slow_animations = event.IsControlDown() && event.IsShiftDown();
+ if (slow_animations)
+ ui::LayerAnimator::set_time_scale_for_test(4);
+
if (sender == size_button_) {
// The maximize button may move out from under the cursor.
ResetWindowControls();
@@ -328,6 +333,9 @@ void BrowserNonClientFrameViewAsh::ButtonPressed(views::Button* sender,
} else if (sender == close_button_) {
frame()->Close();
}
+
+ if (slow_animations)
+ ui::LayerAnimator::set_time_scale_for_test(1);
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698