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

Side by Side Diff: ui/accessibility/platform/ax_platform_node.cc

Issue 2715543003: Views a11y: Implement AXPlatformNode::FromNativeViewAccessible on all platforms. (Closed)
Patch Set: Rebase again. 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 | « no previous file | ui/accessibility/platform/ax_platform_node_auralinux.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 #include "ui/accessibility/platform/ax_platform_node.h" 5 #include "ui/accessibility/platform/ax_platform_node.h"
6 6
7 #include "base/containers/hash_tables.h" 7 #include "base/containers/hash_tables.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/accessibility/ax_node_data.h" 10 #include "ui/accessibility/ax_node_data.h"
11 #include "ui/accessibility/platform/ax_platform_node_delegate.h" 11 #include "ui/accessibility/platform/ax_platform_node_delegate.h"
12 #include "ui/accessibility/platform/ax_platform_unique_id.h" 12 #include "ui/accessibility/platform/ax_platform_unique_id.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 namespace { 16 namespace {
17 17
18 using UniqueIdMap = base::hash_map<int32_t, AXPlatformNode*>; 18 using UniqueIdMap = base::hash_map<int32_t, AXPlatformNode*>;
19 // Map from each AXPlatformNode's unique id to its instance. 19 // Map from each AXPlatformNode's unique id to its instance.
20 base::LazyInstance<UniqueIdMap>::DestructorAtExit g_unique_id_map = 20 base::LazyInstance<UniqueIdMap>::DestructorAtExit g_unique_id_map =
21 LAZY_INSTANCE_INITIALIZER; 21 LAZY_INSTANCE_INITIALIZER;
22 } 22 }
23 23
24 #if !defined(OS_WIN) 24 #if defined(OS_ANDROID)
tapted 2017/03/23 04:24:32 I think this #if block can just be removed now (i.
Patti Lor 2017/03/24 04:34:00 Oo, ok. Thanks, done!
25 // This is the default implementation for platforms where native views 25 // This is the default implementation for platforms where native views
26 // accessibility is unsupported or unfinished. 26 // accessibility is unsupported or unfinished.
27 // 27 //
28 // static 28 // static
29 AXPlatformNode* AXPlatformNode::FromNativeViewAccessible( 29 AXPlatformNode* AXPlatformNode::FromNativeViewAccessible(
30 gfx::NativeViewAccessible accessible) { 30 gfx::NativeViewAccessible accessible) {
31 return nullptr; 31 return nullptr;
32 } 32 }
33 #endif 33 #endif
34 34
(...skipping 14 matching lines...) Expand all
49 AXPlatformNode* AXPlatformNode::GetFromUniqueId(int32_t unique_id) { 49 AXPlatformNode* AXPlatformNode::GetFromUniqueId(int32_t unique_id) {
50 UniqueIdMap* unique_ids = g_unique_id_map.Pointer(); 50 UniqueIdMap* unique_ids = g_unique_id_map.Pointer();
51 auto iter = unique_ids->find(unique_id); 51 auto iter = unique_ids->find(unique_id);
52 if (iter != unique_ids->end()) 52 if (iter != unique_ids->end())
53 return iter->second; 53 return iter->second;
54 54
55 return nullptr; 55 return nullptr;
56 } 56 }
57 57
58 } // namespace ui 58 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/accessibility/platform/ax_platform_node_auralinux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698