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

Unified Diff: ash/wm/window_mirror_view.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
Index: ash/wm/window_mirror_view.cc
diff --git a/ash/wm/window_mirror_view.cc b/ash/wm/window_mirror_view.cc
index 374207c1c61cc35bec7ca4d259119404fcc4ffd2..d0edf3171af7338588e8fdc5d45168527b63f99a 100644
--- a/ash/wm/window_mirror_view.cc
+++ b/ash/wm/window_mirror_view.cc
@@ -69,13 +69,13 @@ void WindowMirrorView::OnVisibleBoundsChanged() {
InitLayerOwner();
}
-ui::LayerDelegate* WindowMirrorView::CreateDelegate(
- ui::LayerDelegate* delegate) {
- if (!delegate)
+ui::LayerDelegate* WindowMirrorView::CreateDelegate(ui::Layer* new_layer,
+ ui::Layer* old_layer) {
+ if (!old_layer || !old_layer->delegate())
return nullptr;
- delegates_.push_back(
- base::WrapUnique(new ForwardingLayerDelegate(target_, delegate)));
+ delegates_.push_back(
+ base::WrapUnique(new ForwardingLayerDelegate(new_layer, old_layer)));
return delegates_.back().get();
}
@@ -91,7 +91,6 @@ void WindowMirrorView::InitLayerOwner() {
// Some extra work is needed when the target window is minimized.
if (target_->GetWindowState()->IsMinimized()) {
- GetMirrorLayer()->SetVisible(true);
GetMirrorLayer()->SetOpacity(1);
EnsureAllChildrenAreVisible(GetMirrorLayer());
}

Powered by Google App Engine
This is Rietveld 408576698