Chromium Code Reviews| 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 (std::find(transient_children.begin(), | 98 if (ContainsValue(transient_children, *iter)) { |
|
sky
2015/12/01 22:08:31
nit: nuke {}
tfarina
2015/12/02 20:31:41
Done.
| |
| 99 transient_children.end(), | |
| 100 *iter) != transient_children.end()) { | |
| 101 topmost_transient_child = *iter; | 99 topmost_transient_child = *iter; |
| 102 } | 100 } |
| 103 } | 101 } |
| 104 if (topmost_transient_child) { | 102 if (topmost_transient_child) { |
| 105 window_->parent()->layer()->StackAbove( | 103 window_->parent()->layer()->StackAbove( |
| 106 layer_owner_->root(), topmost_transient_child->layer()); | 104 layer_owner_->root(), topmost_transient_child->layer()); |
| 107 } | 105 } |
| 108 } | 106 } |
| 109 } | 107 } |
| 110 | 108 |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 659 // being accessed via Remote Desktop. | 657 // being accessed via Remote Desktop. |
| 660 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == | 658 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == |
| 661 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) | 659 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) |
| 662 return false; | 660 return false; |
| 663 | 661 |
| 664 // Let the user decide whether or not to play the animation. | 662 // Let the user decide whether or not to play the animation. |
| 665 return !gfx::Animation::ShouldRenderRichAnimation(); | 663 return !gfx::Animation::ShouldRenderRichAnimation(); |
| 666 } | 664 } |
| 667 | 665 |
| 668 } // namespace wm | 666 } // namespace wm |
| OLD | NEW |