| 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> | |
| 10 | 9 |
| 11 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 12 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
| 13 | 12 |
| 14 template <typename T> struct DefaultSingletonTraits; | 13 template <typename T> struct DefaultSingletonTraits; |
| 15 | 14 |
| 16 namespace aura { | 15 namespace aura { |
| 17 class Window; | 16 class Window; |
| 18 } // namespace aura | 17 } // namespace aura |
| 19 | 18 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 46 void Remove(View* view); | 45 void Remove(View* view); |
| 47 void Remove(Widget* widget); | 46 void Remove(Widget* widget); |
| 48 void Remove(aura::Window* window); | 47 void Remove(aura::Window* window); |
| 49 | 48 |
| 50 // Lookup a cached entry based on an id. | 49 // Lookup a cached entry based on an id. |
| 51 AXAuraObjWrapper* Get(int32 id); | 50 AXAuraObjWrapper* Get(int32 id); |
| 52 | 51 |
| 53 // Remove a cached entry based on an id. | 52 // Remove a cached entry based on an id. |
| 54 void Remove(int32 id); | 53 void Remove(int32 id); |
| 55 | 54 |
| 56 // Get all top level windows this cache knows about. | |
| 57 void GetTopLevelWindows(std::vector<AXAuraObjWrapper*>* children); | |
| 58 | |
| 59 // Indicates if this object's currently being destroyed. | 55 // Indicates if this object's currently being destroyed. |
| 60 bool is_destroying() { return is_destroying_; } | 56 bool is_destroying() { return is_destroying_; } |
| 61 | 57 |
| 62 private: | 58 private: |
| 63 friend struct DefaultSingletonTraits<AXAuraObjCache>; | 59 friend struct DefaultSingletonTraits<AXAuraObjCache>; |
| 64 | 60 |
| 65 AXAuraObjCache(); | 61 AXAuraObjCache(); |
| 66 virtual ~AXAuraObjCache(); | 62 virtual ~AXAuraObjCache(); |
| 67 | 63 |
| 68 template <typename AuraViewWrapper, typename AuraView> | 64 template <typename AuraViewWrapper, typename AuraView> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 84 | 80 |
| 85 // True immediately when entering this object's destructor. | 81 // True immediately when entering this object's destructor. |
| 86 bool is_destroying_; | 82 bool is_destroying_; |
| 87 | 83 |
| 88 DISALLOW_COPY_AND_ASSIGN(AXAuraObjCache); | 84 DISALLOW_COPY_AND_ASSIGN(AXAuraObjCache); |
| 89 }; | 85 }; |
| 90 | 86 |
| 91 } // namespace views | 87 } // namespace views |
| 92 | 88 |
| 93 #endif // UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ | 89 #endif // UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ |
| OLD | NEW |