| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (window_->parent()) { | 88 if (window_->parent()) { |
| 89 const aura::Window::Windows& transient_children = | 89 const aura::Window::Windows& transient_children = |
| 90 GetTransientChildren(window_); | 90 GetTransientChildren(window_); |
| 91 aura::Window::Windows::const_iterator iter = | 91 aura::Window::Windows::const_iterator iter = |
| 92 std::find(window_->parent()->children().begin(), | 92 std::find(window_->parent()->children().begin(), |
| 93 window_->parent()->children().end(), | 93 window_->parent()->children().end(), |
| 94 window_); | 94 window_); |
| 95 DCHECK(iter != window_->parent()->children().end()); | 95 DCHECK(iter != window_->parent()->children().end()); |
| 96 aura::Window* topmost_transient_child = NULL; | 96 aura::Window* topmost_transient_child = NULL; |
| 97 for (++iter; iter != window_->parent()->children().end(); ++iter) { | 97 for (++iter; iter != window_->parent()->children().end(); ++iter) { |
| 98 if (ContainsValue(transient_children, *iter)) | 98 if (base::ContainsValue(transient_children, *iter)) |
| 99 topmost_transient_child = *iter; | 99 topmost_transient_child = *iter; |
| 100 } | 100 } |
| 101 if (topmost_transient_child) { | 101 if (topmost_transient_child) { |
| 102 window_->parent()->layer()->StackAbove( | 102 window_->parent()->layer()->StackAbove( |
| 103 layer_owner_->root(), topmost_transient_child->layer()); | 103 layer_owner_->root(), topmost_transient_child->layer()); |
| 104 } | 104 } |
| 105 } | 105 } |
| 106 // Reset the transform for the |window_|. Because the animation may have | 106 // Reset the transform for the |window_|. Because the animation may have |
| 107 // changed the transform, when recreating the layers we need to reset the | 107 // changed the transform, when recreating the layers we need to reset the |
| 108 // transform otherwise the recreated layer has the transform installed | 108 // transform otherwise the recreated layer has the transform installed |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 // being accessed via Remote Desktop. | 660 // being accessed via Remote Desktop. |
| 661 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == | 661 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == |
| 662 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) | 662 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) |
| 663 return false; | 663 return false; |
| 664 | 664 |
| 665 // Let the user decide whether or not to play the animation. | 665 // Let the user decide whether or not to play the animation. |
| 666 return !gfx::Animation::ShouldRenderRichAnimation(); | 666 return !gfx::Animation::ShouldRenderRichAnimation(); |
| 667 } | 667 } |
| 668 | 668 |
| 669 } // namespace wm | 669 } // namespace wm |
| OLD | NEW |