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

Unified Diff: ui/aura/window.cc

Issue 8700013: Release aura::Desktop event handler windows on detaching an ancestor window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use parent_ to access parent. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('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 6b4c5d2553823dc126021633a0cf45583728585e..d394d106f6e79719fc8d1438c04739547129b439 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -277,6 +277,14 @@ void Window::RemoveChild(Window* child) {
child->OnParentChanged();
}
+bool Window::Contains(const Window* other) const {
+ for (const Window* parent = other; parent; parent = parent->parent_) {
+ if (parent == this)
+ return true;
+ }
+ return false;
+}
+
Window* Window::GetChildById(int id) {
return const_cast<Window*>(const_cast<const Window*>(this)->GetChildById(id));
}
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698