OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/corewm/window_animations.h" | 5 #include "ui/views/corewm/window_animations.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 DEFINE_WINDOW_PROPERTY_KEY(float, | 59 DEFINE_WINDOW_PROPERTY_KEY(float, |
60 kWindowVisibilityAnimationVerticalPositionKey, | 60 kWindowVisibilityAnimationVerticalPositionKey, |
61 kWindowAnimation_Vertical_TranslateY); | 61 kWindowAnimation_Vertical_TranslateY); |
62 | 62 |
63 namespace { | 63 namespace { |
64 | 64 |
65 const int kDefaultAnimationDurationForMenuMS = 150; | 65 const int kDefaultAnimationDurationForMenuMS = 150; |
66 | 66 |
67 const float kWindowAnimation_HideOpacity = 0.f; | 67 const float kWindowAnimation_HideOpacity = 0.f; |
68 const float kWindowAnimation_ShowOpacity = 1.f; | 68 const float kWindowAnimation_ShowOpacity = 1.f; |
69 const float kWindowAnimation_TranslateFactor = 0.025f; | 69 const float kWindowAnimation_TranslateFactor = 0.5f; |
70 const float kWindowAnimation_ScaleFactor = .95f; | 70 const float kWindowAnimation_ScaleFactor = .95f; |
71 | 71 |
72 const int kWindowAnimation_Rotate_DurationMS = 180; | 72 const int kWindowAnimation_Rotate_DurationMS = 180; |
73 const int kWindowAnimation_Rotate_OpacityDurationPercent = 90; | 73 const int kWindowAnimation_Rotate_OpacityDurationPercent = 90; |
74 const float kWindowAnimation_Rotate_TranslateY = -20.f; | 74 const float kWindowAnimation_Rotate_TranslateY = -20.f; |
75 const float kWindowAnimation_Rotate_PerspectiveDepth = 500.f; | 75 const float kWindowAnimation_Rotate_PerspectiveDepth = 500.f; |
76 const float kWindowAnimation_Rotate_DegreesX = 5.f; | 76 const float kWindowAnimation_Rotate_DegreesX = 5.f; |
77 const float kWindowAnimation_Rotate_ScaleFactor = .99f; | 77 const float kWindowAnimation_Rotate_ScaleFactor = .99f; |
78 | 78 |
79 const float kWindowAnimation_Bounce_Scale = 1.02f; | 79 const float kWindowAnimation_Bounce_Scale = 1.02f; |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 485 |
486 bool WindowAnimationsDisabled(aura::Window* window) { | 486 bool WindowAnimationsDisabled(aura::Window* window) { |
487 return (window && | 487 return (window && |
488 window->GetProperty(aura::client::kAnimationsDisabledKey)) || | 488 window->GetProperty(aura::client::kAnimationsDisabledKey)) || |
489 CommandLine::ForCurrentProcess()->HasSwitch( | 489 CommandLine::ForCurrentProcess()->HasSwitch( |
490 switches::kWindowAnimationsDisabled); | 490 switches::kWindowAnimationsDisabled); |
491 } | 491 } |
492 | 492 |
493 } // namespace corewm | 493 } // namespace corewm |
494 } // namespace views | 494 } // namespace views |
OLD | NEW |