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

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

Issue 1629403004: Remove all descendant views from AXAuraObjCache when a view is removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only compile unit tests on aura platforms Created 4 years, 11 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_aura_obj_cache_unittest.cc » ('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 3d4850e0bc26a827e2b7090a7f1bc941c679716e..47964bee739a40487fc24c7fc673fcfd6ad6ac15 100644
--- a/ui/views/accessibility/ax_aura_obj_cache.cc
+++ b/ui/views/accessibility/ax_aura_obj_cache.cc
@@ -33,15 +33,15 @@ AXAuraObjWrapper* AXAuraObjCache::GetOrCreate(aura::Window* window) {
return CreateInternal<AXWindowObjWrapper>(window, window_to_id_map_);
}
-int32_t AXAuraObjCache::GetID(View* view) {
+int32_t AXAuraObjCache::GetID(View* view) const {
return GetIDInternal(view, view_to_id_map_);
}
-int32_t AXAuraObjCache::GetID(Widget* widget) {
+int32_t AXAuraObjCache::GetID(Widget* widget) const {
return GetIDInternal(widget, widget_to_id_map_);
}
-int32_t AXAuraObjCache::GetID(aura::Window* window) {
+int32_t AXAuraObjCache::GetID(aura::Window* window) const {
return GetIDInternal(window, window_to_id_map_);
}
@@ -129,13 +129,11 @@ AXAuraObjWrapper* AXAuraObjCache::CreateInternal(
template <typename AuraView>
int32_t AXAuraObjCache::GetIDInternal(
AuraView* aura_view,
- std::map<AuraView*, int32_t>& aura_view_to_id_map) {
+ const std::map<AuraView*, int32_t>& aura_view_to_id_map) const {
if (!aura_view)
return -1;
- typename std::map<AuraView*, int32_t>::iterator it =
- aura_view_to_id_map.find(aura_view);
-
+ auto it = aura_view_to_id_map.find(aura_view);
if (it != aura_view_to_id_map.end())
return it->second;
« no previous file with comments | « ui/views/accessibility/ax_aura_obj_cache.h ('k') | ui/views/accessibility/ax_aura_obj_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698