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

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

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
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 #include "ui/accessibility/ax_tree_id_registry.h" 5 #include "ui/accessibility/ax_tree_id_registry.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "ui/accessibility/ax_host_delegate.h" 8 #include "ui/accessibility/ax_host_delegate.h"
9 9
10 namespace ui { 10 namespace ui {
11 11
12 // static 12 // static
13 const AXTreeIDRegistry::AXTreeID AXTreeIDRegistry::kNoAXTreeID = -1;
14
15 // static
16 AXTreeIDRegistry* AXTreeIDRegistry::GetInstance() { 13 AXTreeIDRegistry* AXTreeIDRegistry::GetInstance() {
17 return base::Singleton<AXTreeIDRegistry>::get(); 14 return base::Singleton<AXTreeIDRegistry>::get();
18 } 15 }
19 16
20 AXTreeIDRegistry::AXTreeID AXTreeIDRegistry::GetOrCreateAXTreeID( 17 AXTreeIDRegistry::AXTreeID AXTreeIDRegistry::GetOrCreateAXTreeID(
21 int process_id, 18 int process_id,
22 int routing_id) { 19 int routing_id) {
23 FrameID frame_id(process_id, routing_id); 20 FrameID frame_id(process_id, routing_id);
24 auto it = frame_to_ax_tree_id_map_.find(frame_id); 21 auto it = frame_to_ax_tree_id_map_.find(frame_id);
25 if (it != frame_to_ax_tree_id_map_.end()) 22 if (it != frame_to_ax_tree_id_map_.end())
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 75 }
79 76
80 AXTreeIDRegistry::AXTreeIDRegistry() : ax_tree_id_counter_(-1) { 77 AXTreeIDRegistry::AXTreeIDRegistry() : ax_tree_id_counter_(-1) {
81 // Always populate default desktop tree value (0 -> 0, 0). 78 // Always populate default desktop tree value (0 -> 0, 0).
82 GetOrCreateAXTreeID(0, 0); 79 GetOrCreateAXTreeID(0, 0);
83 } 80 }
84 81
85 AXTreeIDRegistry::~AXTreeIDRegistry() {} 82 AXTreeIDRegistry::~AXTreeIDRegistry() {}
86 83
87 } // namespace ui 84 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_tree_id_registry.h ('k') | ui/accessibility/platform/aura_window_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698