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

Unified Diff: ui/wm/core/window_util.cc

Issue 2254733003: Add ui::LayerObserver and use it to update Alt+Tab previews as needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer owner Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« ui/compositor/layer_observer.h ('K') | « ui/wm/core/window_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/window_util.cc
diff --git a/ui/wm/core/window_util.cc b/ui/wm/core/window_util.cc
index 07723511c841a3fd3c58726520c205064cc1c062..bdfaee5981c440c4c335dd000f6ec044b9393cef 100644
--- a/ui/wm/core/window_util.cc
+++ b/ui/wm/core/window_util.cc
@@ -28,7 +28,7 @@ void CloneChildren(ui::Layer* to_clone,
if (old_layer) {
if (factory && owner->layer()->delegate())
old_layer->set_delegate(
- factory->CreateDelegate(owner->layer()->delegate()));
+ factory->CreateDelegate(old_layer, owner->layer()));
parent->Add(old_layer);
// RecreateLayer() moves the existing children to the new layer. Create a
// copy of those.
@@ -91,10 +91,9 @@ std::unique_ptr<ui::LayerTreeOwner> RecreateLayers(
std::unique_ptr<ui::LayerTreeOwner> old_layer(
new ui::LayerTreeOwner(root->RecreateLayer().release()));
if (old_layer->root()) {
- if (factory) {
sky 2016/08/23 17:15:07 optional: personally I would leave the {} here as
Evan Stade 2016/08/29 23:51:54 oops, this was not intentional
+ if (factory)
old_layer->root()->set_delegate(
- factory->CreateDelegate(root->layer()->delegate()));
- }
+ factory->CreateDelegate(old_layer->root(), root->layer()));
CloneChildren(root->layer(), old_layer->root(), factory);
}
return old_layer;
« ui/compositor/layer_observer.h ('K') | « ui/wm/core/window_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698