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

Unified Diff: ui/views/accessibility/ax_window_obj_wrapper.cc

Issue 2295183003: Update desktop tree when Aura windows are removed. (Closed)
Patch Set: Fix test. 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
« no previous file with comments | « ui/views/accessibility/ax_window_obj_wrapper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessibility/ax_window_obj_wrapper.cc
diff --git a/ui/views/accessibility/ax_window_obj_wrapper.cc b/ui/views/accessibility/ax_window_obj_wrapper.cc
index 5a3bd3d2e5550df685df8a203f2cc9af7ab47d89..7117443cc5c6203df3d26a73e6392a7a4766f141 100644
--- a/ui/views/accessibility/ax_window_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_window_obj_wrapper.cc
@@ -61,7 +61,19 @@ int32_t AXWindowObjWrapper::GetID() {
}
void AXWindowObjWrapper::OnWindowDestroyed(aura::Window* window) {
- AXAuraObjCache::GetInstance()->Remove(window);
+ AXAuraObjCache::GetInstance()->Remove(window, nullptr);
+}
+
+void AXWindowObjWrapper::OnWindowDestroying(aura::Window* window) {
+ Widget* widget = Widget::GetWidgetForNativeView(window);
+ if (widget)
+ AXAuraObjCache::GetInstance()->Remove(widget);
+}
+
+void AXWindowObjWrapper::OnWindowHierarchyChanged(
+ const HierarchyChangeParams& params) {
+ if (params.phase == WindowObserver::HierarchyChangeParams::HIERARCHY_CHANGED)
+ AXAuraObjCache::GetInstance()->Remove(params.target, params.old_parent);
}
} // namespace views
« no previous file with comments | « ui/views/accessibility/ax_window_obj_wrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698