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

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

Issue 2383263002: Generalize layer mirroring for phantom windows (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/views/view_unittest_aura.cc ('k') | ui/wm/core/window_util.h » ('j') | 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 WindowInvalid(); 77 WindowInvalid();
78 } 78 }
79 79
80 // Detach the current layers and create new layers for |window_|. 80 // Detach the current layers and create new layers for |window_|.
81 // Stack the original layers above |window_| and its transient 81 // Stack the original layers above |window_| and its transient
82 // children. If the window has transient children, the original 82 // children. If the window has transient children, the original
83 // layers will be moved above the top most transient child so that 83 // layers will be moved above the top most transient child so that
84 // activation change does not put the window above the animating 84 // activation change does not put the window above the animating
85 // layer. 85 // layer.
86 void DetachAndRecreateLayers() { 86 void DetachAndRecreateLayers() {
87 layer_owner_ = RecreateLayers(window_, nullptr); 87 layer_owner_ = RecreateLayers(window_);
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) {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/views/view_unittest_aura.cc ('k') | ui/wm/core/window_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698