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

Unified Diff: ui/views/widget/widget.cc

Issue 196603003: Reland r256396 Add views implementation for AXTreeSource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/views/views.gyp ('k') | ui/views/widget/widget_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 68c339ab9509a76ffe0781efddfed1f461f8a699..6be502d8b1e8fbb8dc9f492782f28193de8c7688 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -427,6 +427,13 @@ void Widget::ViewHierarchyChanged(
focus_manager->ViewRemoved(details.child);
ViewStorage::GetInstance()->ViewRemoved(details.child);
native_widget_->ViewRemoved(details.child);
+
+ // Many observers do not remove themselves during destruction, so we must
+ // not notify once we destroy our |root_view_|.
+ if (root_view_.get()) {
+ FOR_EACH_OBSERVER(
+ WidgetObserver, observers_, OnViewRemoved(this, details.child));
+ }
}
}
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/widget_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698