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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 (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_ so that window's bound is represent | |
|
sky
2016/05/18 00:03:55
nit: |window_| (just as on line 80 and 81).
Also,
| |
| 107 // the correct value. | |
| 108 window_->layer()->SetTransform(gfx::Transform()); | |
| 106 } | 109 } |
| 107 | 110 |
| 108 protected: | 111 protected: |
| 109 // Invoked when the hiding animation is completed. It will delete | 112 // Invoked when the hiding animation is completed. It will delete |
| 110 // 'this', and no operation should be made on this object after this | 113 // 'this', and no operation should be made on this object after this |
| 111 // point. | 114 // point. |
| 112 void OnAnimationCompleted() { | 115 void OnAnimationCompleted() { |
| 113 // Window may have been destroyed by this point. | 116 // Window may have been destroyed by this point. |
| 114 if (window_) { | 117 if (window_) { |
| 115 aura::client::AnimationHost* animation_host = | 118 aura::client::AnimationHost* animation_host = |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 655 // being accessed via Remote Desktop. | 658 // being accessed via Remote Desktop. |
| 656 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == | 659 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == |
| 657 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) | 660 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) |
| 658 return false; | 661 return false; |
| 659 | 662 |
| 660 // Let the user decide whether or not to play the animation. | 663 // Let the user decide whether or not to play the animation. |
| 661 return !gfx::Animation::ShouldRenderRichAnimation(); | 664 return !gfx::Animation::ShouldRenderRichAnimation(); |
| 662 } | 665 } |
| 663 | 666 |
| 664 } // namespace wm | 667 } // namespace wm |
| OLD | NEW |