| 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 19 matching lines...) Expand all Loading... |
| 30 #include "ui/gfx/animation/animation.h" | 30 #include "ui/gfx/animation/animation.h" |
| 31 #include "ui/gfx/interpolated_transform.h" | 31 #include "ui/gfx/interpolated_transform.h" |
| 32 #include "ui/gfx/rect_conversions.h" | 32 #include "ui/gfx/rect_conversions.h" |
| 33 #include "ui/gfx/screen.h" | 33 #include "ui/gfx/screen.h" |
| 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 | 38 |
| 39 DECLARE_WINDOW_PROPERTY_TYPE(int) | 39 DECLARE_WINDOW_PROPERTY_TYPE(int) |
| 40 DECLARE_WINDOW_PROPERTY_TYPE(views::corewm::WindowVisibilityAnimationType) | 40 DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationType) |
| 41 DECLARE_WINDOW_PROPERTY_TYPE(views::corewm::WindowVisibilityAnimationTransition) | 41 DECLARE_WINDOW_PROPERTY_TYPE(wm::WindowVisibilityAnimationTransition) |
| 42 DECLARE_WINDOW_PROPERTY_TYPE(float) | 42 DECLARE_WINDOW_PROPERTY_TYPE(float) |
| 43 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_CORE_EXPORT, bool) | 43 DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(WM_CORE_EXPORT, bool) |
| 44 | 44 |
| 45 using aura::Window; | 45 using aura::Window; |
| 46 using base::TimeDelta; | 46 using base::TimeDelta; |
| 47 using ui::Layer; | 47 using ui::Layer; |
| 48 | 48 |
| 49 namespace views { | 49 namespace wm { |
| 50 namespace corewm { | |
| 51 namespace { | 50 namespace { |
| 52 const float kWindowAnimation_Vertical_TranslateY = 15.f; | 51 const float kWindowAnimation_Vertical_TranslateY = 15.f; |
| 53 } // namespace | 52 } // namespace |
| 54 | 53 |
| 55 DEFINE_WINDOW_PROPERTY_KEY(int, | 54 DEFINE_WINDOW_PROPERTY_KEY(int, |
| 56 kWindowVisibilityAnimationTypeKey, | 55 kWindowVisibilityAnimationTypeKey, |
| 57 WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT); | 56 WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT); |
| 58 DEFINE_WINDOW_PROPERTY_KEY(int, kWindowVisibilityAnimationDurationKey, 0); | 57 DEFINE_WINDOW_PROPERTY_KEY(int, kWindowVisibilityAnimationDurationKey, 0); |
| 59 DEFINE_WINDOW_PROPERTY_KEY(WindowVisibilityAnimationTransition, | 58 DEFINE_WINDOW_PROPERTY_KEY(WindowVisibilityAnimationTransition, |
| 60 kWindowVisibilityAnimationTransitionKey, | 59 kWindowVisibilityAnimationTransitionKey, |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 546 } |
| 548 } | 547 } |
| 549 | 548 |
| 550 bool WindowAnimationsDisabled(aura::Window* window) { | 549 bool WindowAnimationsDisabled(aura::Window* window) { |
| 551 return (!gfx::Animation::ShouldRenderRichAnimation() || (window && | 550 return (!gfx::Animation::ShouldRenderRichAnimation() || (window && |
| 552 window->GetProperty(aura::client::kAnimationsDisabledKey)) || | 551 window->GetProperty(aura::client::kAnimationsDisabledKey)) || |
| 553 CommandLine::ForCurrentProcess()->HasSwitch( | 552 CommandLine::ForCurrentProcess()->HasSwitch( |
| 554 switches::kWindowAnimationsDisabled)); | 553 switches::kWindowAnimationsDisabled)); |
| 555 } | 554 } |
| 556 | 555 |
| 557 } // namespace corewm | 556 } // namespace wm |
| 558 } // namespace views | |
| OLD | NEW |