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

Unified Diff: ui/aura/window.cc

Issue 558203002: Propagate window transformed notification to child hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 6 years, 3 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 | « ui/aura/window.h ('k') | ui/aura/window_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 5c05d4440acd1f96f612415f583f5fb75170b244..fb25f62a3d24ed8e984851e5454033187a7baeb1 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -409,6 +409,7 @@ void Window::SetTransform(const gfx::Transform& transform) {
layer()->SetTransform(transform);
FOR_EACH_OBSERVER(WindowObserver, observers_,
OnWindowTransformed(this));
+ NotifyAncestorWindowTransformed(this);
}
void Window::SetLayoutManager(LayoutManager* layout_manager) {
@@ -1317,6 +1318,15 @@ void Window::NotifyWindowVisibilityChangedUp(aura::Window* target,
}
}
+void Window::NotifyAncestorWindowTransformed(Window* source) {
+ FOR_EACH_OBSERVER(WindowObserver, observers_,
+ OnAncestorWindowTransformed(source, this));
+ for (Window::Windows::const_iterator it = children_.begin();
+ it != children_.end(); ++it) {
+ (*it)->NotifyAncestorWindowTransformed(source);
+ }
+}
+
void Window::OnWindowBoundsChanged(const gfx::Rect& old_bounds) {
if (layer()) {
bounds_ = layer()->bounds();
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698