Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: ui/wm/core/window_animations.cc

Issue 1986963003: Apps window keeps moving down to the right when reopened (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/wm/core/visibility_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_|. Because the animation may have
107 // changed the transform, when recreating the layers we need to reset the
108 // transform otherwise the recreated layer has the transform installed
109 // for the animation.
110 window_->layer()->SetTransform(gfx::Transform());
106 } 111 }
107 112
108 protected: 113 protected:
109 // Invoked when the hiding animation is completed. It will delete 114 // Invoked when the hiding animation is completed. It will delete
110 // 'this', and no operation should be made on this object after this 115 // 'this', and no operation should be made on this object after this
111 // point. 116 // point.
112 void OnAnimationCompleted() { 117 void OnAnimationCompleted() {
113 // Window may have been destroyed by this point. 118 // Window may have been destroyed by this point.
114 if (window_) { 119 if (window_) {
115 aura::client::AnimationHost* animation_host = 120 aura::client::AnimationHost* animation_host =
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // being accessed via Remote Desktop. 660 // being accessed via Remote Desktop.
656 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() == 661 if (ui::ScopedAnimationDurationScaleMode::duration_scale_mode() ==
657 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION) 662 ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION)
658 return false; 663 return false;
659 664
660 // Let the user decide whether or not to play the animation. 665 // Let the user decide whether or not to play the animation.
661 return !gfx::Animation::ShouldRenderRichAnimation(); 666 return !gfx::Animation::ShouldRenderRichAnimation();
662 } 667 }
663 668
664 } // namespace wm 669 } // namespace wm
OLDNEW
« no previous file with comments | « ui/wm/core/visibility_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698