Chromium Code Reviews| 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..7107da3f07ca7b7e426bc84980e16aa555972f76 100644 |
| --- a/ui/views/accessibility/ax_aura_obj_cache.cc |
| +++ b/ui/views/accessibility/ax_aura_obj_cache.cc |
| @@ -74,8 +74,19 @@ void AXAuraObjCache::Remove(Widget* widget) { |
| RemoveViewSubtree(widget->GetRootView()); |
| } |
| -void AXAuraObjCache::Remove(aura::Window* window) { |
| +void AXAuraObjCache::Remove(aura::Window* window, bool notify) { |
| + int id = GetIDInternal(window, window_to_id_map_); |
| + AXAuraObjWrapper* obj = nullptr; |
| + if (id != -1) { |
|
dmazzoni
2016/08/31 16:33:50
This check isn't necessary, right? You can still c
David Tseng
2016/08/31 21:06:42
Done.
|
| + obj = Get(id); |
| + if (obj) |
| + obj = obj->GetParent(); |
| + } |
| + |
| RemoveInternal(window, window_to_id_map_); |
| + |
| + if (notify && delegate_) |
| + delegate_->OnChildWindowRemoved(obj); |
| } |
| AXAuraObjWrapper* AXAuraObjCache::Get(int32_t id) { |
| @@ -117,8 +128,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; |