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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "ui/views/views_export.h" | 12 #include "ui/views/views_export.h" |
13 | 13 |
| 14 namespace base { |
14 template <typename T> struct DefaultSingletonTraits; | 15 template <typename T> struct DefaultSingletonTraits; |
| 16 } |
15 | 17 |
16 namespace aura { | 18 namespace aura { |
17 class Window; | 19 class Window; |
18 } // namespace aura | 20 } // namespace aura |
19 | 21 |
20 namespace views { | 22 namespace views { |
21 class AXAuraObjWrapper; | 23 class AXAuraObjWrapper; |
22 class View; | 24 class View; |
23 class Widget; | 25 class Widget; |
24 | 26 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Remove a cached entry based on an id. | 58 // Remove a cached entry based on an id. |
57 void Remove(int32 id); | 59 void Remove(int32 id); |
58 | 60 |
59 // Get all top level windows this cache knows about. | 61 // Get all top level windows this cache knows about. |
60 void GetTopLevelWindows(std::vector<AXAuraObjWrapper*>* children); | 62 void GetTopLevelWindows(std::vector<AXAuraObjWrapper*>* children); |
61 | 63 |
62 // Indicates if this object's currently being destroyed. | 64 // Indicates if this object's currently being destroyed. |
63 bool is_destroying() { return is_destroying_; } | 65 bool is_destroying() { return is_destroying_; } |
64 | 66 |
65 private: | 67 private: |
66 friend struct DefaultSingletonTraits<AXAuraObjCache>; | 68 friend struct base::DefaultSingletonTraits<AXAuraObjCache>; |
67 | 69 |
68 AXAuraObjCache(); | 70 AXAuraObjCache(); |
69 virtual ~AXAuraObjCache(); | 71 virtual ~AXAuraObjCache(); |
70 | 72 |
71 template <typename AuraViewWrapper, typename AuraView> | 73 template <typename AuraViewWrapper, typename AuraView> |
72 AXAuraObjWrapper* CreateInternal( | 74 AXAuraObjWrapper* CreateInternal( |
73 AuraView* aura_view, std::map<AuraView*, int32>& aura_view_to_id_map); | 75 AuraView* aura_view, std::map<AuraView*, int32>& aura_view_to_id_map); |
74 | 76 |
75 template<typename AuraView> int32 GetIDInternal( | 77 template<typename AuraView> int32 GetIDInternal( |
76 AuraView* aura_view, std::map<AuraView*, int32>& aura_view_to_id_map); | 78 AuraView* aura_view, std::map<AuraView*, int32>& aura_view_to_id_map); |
(...skipping 10 matching lines...) Expand all Loading... |
87 | 89 |
88 // True immediately when entering this object's destructor. | 90 // True immediately when entering this object's destructor. |
89 bool is_destroying_; | 91 bool is_destroying_; |
90 | 92 |
91 DISALLOW_COPY_AND_ASSIGN(AXAuraObjCache); | 93 DISALLOW_COPY_AND_ASSIGN(AXAuraObjCache); |
92 }; | 94 }; |
93 | 95 |
94 } // namespace views | 96 } // namespace views |
95 | 97 |
96 #endif // UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ | 98 #endif // UI_VIEWS_ACCESSIBILITY_AX_AURA_OBJ_CACHE_H_ |
OLD | NEW |