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

Side by Side Diff: ui/views/accessibility/ax_aura_obj_cache.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « ui/gl/gpu_switching_manager.cc ('k') | ui/views/accessibility/ax_aura_obj_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/gl/gpu_switching_manager.cc ('k') | ui/views/accessibility/ax_aura_obj_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698