| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ | 5 #ifndef UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ |
| 6 #define UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ | 6 #define UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // Gets the next unique id for this cache. Useful for non-Aura view backed | 41 // Gets the next unique id for this cache. Useful for non-Aura view backed |
| 42 // views. | 42 // views. |
| 43 int32 GetNextID() { return current_id_++; } | 43 int32 GetNextID() { return current_id_++; } |
| 44 | 44 |
| 45 // Removes an entry from this cache based on an Aura view. | 45 // Removes an entry from this cache based on an Aura view. |
| 46 void Remove(View* view); | 46 void Remove(View* view); |
| 47 void Remove(Widget* widget); | 47 void Remove(Widget* widget); |
| 48 void Remove(aura::Window* window); | 48 void Remove(aura::Window* window); |
| 49 | 49 |
| 50 // Removes a view and all of its descendants from the cache. |
| 51 void RemoveViewSubtree(View* view); |
| 52 |
| 50 // Lookup a cached entry based on an id. | 53 // Lookup a cached entry based on an id. |
| 51 AXAuraObjWrapper* Get(int32 id); | 54 AXAuraObjWrapper* Get(int32 id); |
| 52 | 55 |
| 53 // Remove a cached entry based on an id. | 56 // Remove a cached entry based on an id. |
| 54 void Remove(int32 id); | 57 void Remove(int32 id); |
| 55 | 58 |
| 56 // Get all top level windows this cache knows about. | 59 // Get all top level windows this cache knows about. |
| 57 void GetTopLevelWindows(std::vector<AXAuraObjWrapper*>* children); | 60 void GetTopLevelWindows(std::vector<AXAuraObjWrapper*>* children); |
| 58 | 61 |
| 59 // Indicates if this object's currently being destroyed. | 62 // Indicates if this object's currently being destroyed. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 84 | 87 |
| 85 // True immediately when entering this object's destructor. | 88 // True immediately when entering this object's destructor. |
| 86 bool is_destroying_; | 89 bool is_destroying_; |
| 87 | 90 |
| 88 DISALLOW_COPY_AND_ASSIGN(AXAuraObjCache); | 91 DISALLOW_COPY_AND_ASSIGN(AXAuraObjCache); |
| 89 }; | 92 }; |
| 90 | 93 |
| 91 } // namespace views | 94 } // namespace views |
| 92 | 95 |
| 93 #endif // UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ | 96 #endif // UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ |
| OLD | NEW |