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

Side by Side Diff: ui/accessibility/ax_tree_id_registry.h

Issue 2774683002: Re-land: Add a window property to associate RWHVA with its child AX tree ID (Closed)
Patch Set: Created 3 years, 9 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/accessibility/DEPS ('k') | ui/accessibility/ax_tree_id_registry.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_ACCESSIBILITY_AX_TREE_ID_REGISTRY_H_ 5 #ifndef UI_ACCESSIBILITY_AX_TREE_ID_REGISTRY_H_
6 #define UI_ACCESSIBILITY_AX_TREE_ID_REGISTRY_H_ 6 #define UI_ACCESSIBILITY_AX_TREE_ID_REGISTRY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 16 matching lines...) Expand all
27 // 27 //
28 // The first form allows underlying instances to change but refer to the same 28 // The first form allows underlying instances to change but refer to the same
29 // frame. 29 // frame.
30 // The second form allows this registry to track the object for later retrieval. 30 // The second form allows this registry to track the object for later retrieval.
31 class AX_EXPORT AXTreeIDRegistry { 31 class AX_EXPORT AXTreeIDRegistry {
32 public: 32 public:
33 using FrameID = std::pair<int, int>; 33 using FrameID = std::pair<int, int>;
34 34
35 using AXTreeID = int; 35 using AXTreeID = int;
36 36
37 static const AXTreeID kNoAXTreeID; 37 static constexpr AXTreeID kNoAXTreeID = -1;
38 38
39 // Get the single instance of this class. 39 // Get the single instance of this class.
40 static AXTreeIDRegistry* GetInstance(); 40 static AXTreeIDRegistry* GetInstance();
41 41
42 // Methods for FrameID ax tree id generation, and retrieval. 42 // Methods for FrameID ax tree id generation, and retrieval.
43 AXTreeID GetOrCreateAXTreeID(int process_id, int routing_id); 43 AXTreeID GetOrCreateAXTreeID(int process_id, int routing_id);
44 FrameID GetFrameID(AXTreeID ax_tree_id); 44 FrameID GetFrameID(AXTreeID ax_tree_id);
45 45
46 // Retrieve an |AXHostDelegate|. 46 // Retrieve an |AXHostDelegate|.
47 AXHostDelegate* GetHostDelegate(AXTreeID ax_tree_id); 47 AXHostDelegate* GetHostDelegate(AXTreeID ax_tree_id);
(...skipping 22 matching lines...) Expand all
70 70
71 // Maps an id to its host delegate. 71 // Maps an id to its host delegate.
72 std::map<AXTreeID, AXHostDelegate*> id_to_host_delegate_; 72 std::map<AXTreeID, AXHostDelegate*> id_to_host_delegate_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(AXTreeIDRegistry); 74 DISALLOW_COPY_AND_ASSIGN(AXTreeIDRegistry);
75 }; 75 };
76 76
77 } // namespace ui 77 } // namespace ui
78 78
79 #endif // UI_ACCESSIBILITY_AX_TREE_ID_REGISTRY_H_ 79 #endif // UI_ACCESSIBILITY_AX_TREE_ID_REGISTRY_H_
OLDNEW
« no previous file with comments | « ui/accessibility/DEPS ('k') | ui/accessibility/ax_tree_id_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698