Chromium Code Reviews| 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); |
| } |
| /////////////////////////////////////////////////////////////////////////////// |