| 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/wm/core/window_animations.h" | 5 #include "ui/wm/core/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 23 matching lines...) Expand all Loading... |
| 34 #include "ui/gfx/vector2d.h" | 34 #include "ui/gfx/vector2d.h" |
| 35 #include "ui/gfx/vector3d_f.h" | 35 #include "ui/gfx/vector3d_f.h" |
| 36 #include "ui/wm/core/window_util.h" | 36 #include "ui/wm/core/window_util.h" |
| 37 #include "ui/wm/core/wm_core_switches.h" | 37 #include "ui/wm/core/wm_core_switches.h" |
| 38 #include "ui/wm/public/animation_host.h" | 38 #include "ui/wm/public/animation_host.h" |
| 39 | 39 |
| 40 DECLARE_WINDOW_PROPERTY_TYPE(int) | 40 DECLARE_WINDOW_PROPERTY_TYPE(int) |
| 41 DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationType) | 41 DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationType) |
| 42 DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationTransition) | 42 DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationTransition) |
| 43 DECLARE_WINDOW_PROPERTY_TYPE(float) | 43 DECLARE_WINDOW_PROPERTY_TYPE(float) |
| 44 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_EXPORT, bool) | 44 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_CORE_EXPORT, bool) |
| 45 | 45 |
| 46 namespace wm { | 46 namespace wm { |
| 47 namespace { | 47 namespace { |
| 48 const float kWindowAnimation_Vertical_TranslateY = 15.f; | 48 const float kWindowAnimation_Vertical_TranslateY = 15.f; |
| 49 } // namespace | 49 } // namespace |
| 50 | 50 |
| 51 DEFINE_WINDOW_PROPERTY_KEY(int, | 51 DEFINE_WINDOW_PROPERTY_KEY(int, |
| 52 kWindowVisibilityAnimationTypeKey, | 52 kWindowVisibilityAnimationTypeKey, |
| 53 WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT); | 53 WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT); |
| 54 DEFINE_WINDOW_PROPERTY_KEY(int, kWindowVisibilityAnimationDurationKey, 0); | 54 DEFINE_WINDOW_PROPERTY_KEY(int, kWindowVisibilityAnimationDurationKey, 0); |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 } | 593 } |
| 594 | 594 |
| 595 bool WindowAnimationsDisabled(aura::Window* window) { | 595 bool WindowAnimationsDisabled(aura::Window* window) { |
| 596 return (!gfx::Animation::ShouldRenderRichAnimation() || (window && | 596 return (!gfx::Animation::ShouldRenderRichAnimation() || (window && |
| 597 window->GetProperty(aura::client::kAnimationsDisabledKey)) || | 597 window->GetProperty(aura::client::kAnimationsDisabledKey)) || |
| 598 CommandLine::ForCurrentProcess()->HasSwitch( | 598 CommandLine::ForCurrentProcess()->HasSwitch( |
| 599 switches::kWindowAnimationsDisabled)); | 599 switches::kWindowAnimationsDisabled)); |
| 600 } | 600 } |
| 601 | 601 |
| 602 } // namespace wm | 602 } // namespace wm |
| OLD | NEW |