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

Unified Diff: ui/views/accessibility/ax_aura_obj_cache.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_aura_obj_cache.h ('k') | ui/views/accessibility/ax_widget_obj_wrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessibility/ax_aura_obj_cache.cc
diff --git a/ui/views/accessibility/ax_aura_obj_cache.cc b/ui/views/accessibility/ax_aura_obj_cache.cc
index 28162c3092e9aed129ebf9c9e096bd799cc432fa..2ca3ba507c6a86cc4c70522ba7fe2240090fc28d 100644
--- a/ui/views/accessibility/ax_aura_obj_cache.cc
+++ b/ui/views/accessibility/ax_aura_obj_cache.cc
@@ -74,8 +74,12 @@ void AXAuraObjCache::Remove(Widget* widget) {
RemoveViewSubtree(widget->GetRootView());
}
-void AXAuraObjCache::Remove(aura::Window* window) {
+void AXAuraObjCache::Remove(aura::Window* window, aura::Window* parent) {
+ int id = GetIDInternal(parent, window_to_id_map_);
+ AXAuraObjWrapper* parent_window_obj = Get(id);
RemoveInternal(window, window_to_id_map_);
+ if (parent && delegate_)
+ delegate_->OnChildWindowRemoved(parent_window_obj);
}
AXAuraObjWrapper* AXAuraObjCache::Get(int32_t id) {
@@ -117,8 +121,8 @@ AXAuraObjWrapper* AXAuraObjCache::GetFocus() {
AXAuraObjCache::AXAuraObjCache()
: current_id_(1),
focus_client_(nullptr),
- is_destroying_(false) {
-}
+ is_destroying_(false),
+ delegate_(nullptr) {}
AXAuraObjCache::~AXAuraObjCache() {
is_destroying_ = true;
« no previous file with comments | « ui/views/accessibility/ax_aura_obj_cache.h ('k') | ui/views/accessibility/ax_widget_obj_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698