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

Unified Diff: ash/wm/window_mirror_view.cc

Issue 2383263002: Generalize layer mirroring for phantom windows (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « ash/wm/window_mirror_view.h ('k') | cc/layers/surface_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_mirror_view.cc
diff --git a/ash/wm/window_mirror_view.cc b/ash/wm/window_mirror_view.cc
index d7f0ced6f948e0d8bae005b891180a80fca2a74b..a128a42bedaac454016f1802cd3c474963b4f05f 100644
--- a/ash/wm/window_mirror_view.cc
+++ b/ash/wm/window_mirror_view.cc
@@ -5,7 +5,6 @@
#include "ash/wm/window_mirror_view.h"
#include "ash/aura/wm_window_aura.h"
-#include "ash/common/wm/forwarding_layer_delegate.h"
#include "ash/common/wm/window_state.h"
#include "ash/wm/window_state_aura.h"
#include "ui/aura/client/aura_constants.h"
@@ -13,6 +12,7 @@
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_tree_owner.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/core/window_util.h"
namespace ash {
namespace wm {
@@ -74,24 +74,15 @@ void WindowMirrorView::OnVisibleBoundsChanged() {
InitLayerOwner();
}
-ui::LayerDelegate* WindowMirrorView::CreateDelegate(ui::Layer* new_layer,
- ui::Layer* old_layer) {
- if (!old_layer || !old_layer->delegate())
- return nullptr;
- delegates_.push_back(
- base::MakeUnique<ForwardingLayerDelegate>(new_layer, old_layer));
- return delegates_.back().get();
-}
-
void WindowMirrorView::InitLayerOwner() {
if (!layer_owner_) {
target_->aura_window()->SetProperty(aura::client::kMirroringEnabledKey,
true);
}
- layer_owner_ = ::wm::RecreateLayers(target_->aura_window(), this);
+ layer_owner_ =
+ ::wm::MirrorLayers(target_->aura_window(), false /* sync_bounds */);
- GetMirrorLayer()->parent()->Remove(GetMirrorLayer());
SetPaintToLayer(true);
layer()->Add(GetMirrorLayer());
// This causes us to clip the non-client areas of the window.
« no previous file with comments | « ash/wm/window_mirror_view.h ('k') | cc/layers/surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698