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 #import "ui/accessibility/platform/ax_platform_node_mac.h" | 5 #import "ui/accessibility/platform/ax_platform_node_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 #import "ui/accessibility/platform/ax_platform_node_delegate.h" | 10 #import "ui/accessibility/platform/ax_platform_node_delegate.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 role_map[roles[i].value] = roles[i].nativeValue; | 146 role_map[roles[i].value] = roles[i].nativeValue; |
147 return role_map; | 147 return role_map; |
148 } | 148 } |
149 | 149 |
150 RoleMap BuildSubroleMap() { | 150 RoleMap BuildSubroleMap() { |
151 const MapEntry subroles[] = { | 151 const MapEntry subroles[] = { |
152 {ui::AX_ROLE_ALERT, @"AXApplicationAlert"}, | 152 {ui::AX_ROLE_ALERT, @"AXApplicationAlert"}, |
153 {ui::AX_ROLE_ALERT_DIALOG, @"AXApplicationAlertDialog"}, | 153 {ui::AX_ROLE_ALERT_DIALOG, @"AXApplicationAlertDialog"}, |
154 {ui::AX_ROLE_ARTICLE, @"AXDocumentArticle"}, | 154 {ui::AX_ROLE_ARTICLE, @"AXDocumentArticle"}, |
155 {ui::AX_ROLE_DEFINITION, @"AXDefinition"}, | 155 {ui::AX_ROLE_DEFINITION, @"AXDefinition"}, |
156 {ui::AX_ROLE_DESCRIPTION_LIST_DETAIL, @"AXDescription"}, | 156 {ui::AX_ROLE_DESCRIPTION_LIST_DETAIL, @"AXDefinition"}, |
157 {ui::AX_ROLE_DESCRIPTION_LIST_TERM, @"AXTerm"}, | 157 {ui::AX_ROLE_DESCRIPTION_LIST_TERM, @"AXTerm"}, |
158 {ui::AX_ROLE_DIALOG, @"AXApplicationDialog"}, | 158 {ui::AX_ROLE_DIALOG, @"AXApplicationDialog"}, |
159 {ui::AX_ROLE_DOCUMENT, @"AXDocument"}, | 159 {ui::AX_ROLE_DOCUMENT, @"AXDocument"}, |
160 {ui::AX_ROLE_FOOTER, @"AXLandmarkContentInfo"}, | 160 {ui::AX_ROLE_FOOTER, @"AXLandmarkContentInfo"}, |
161 {ui::AX_ROLE_APPLICATION, @"AXLandmarkApplication"}, | 161 {ui::AX_ROLE_APPLICATION, @"AXLandmarkApplication"}, |
162 {ui::AX_ROLE_BANNER, @"AXLandmarkBanner"}, | 162 {ui::AX_ROLE_BANNER, @"AXLandmarkBanner"}, |
163 {ui::AX_ROLE_COMPLEMENTARY, @"AXLandmarkComplementary"}, | 163 {ui::AX_ROLE_COMPLEMENTARY, @"AXLandmarkComplementary"}, |
164 {ui::AX_ROLE_CONTENT_INFO, @"AXLandmarkContentInfo"}, | 164 {ui::AX_ROLE_CONTENT_INFO, @"AXLandmarkContentInfo"}, |
165 {ui::AX_ROLE_MAIN, @"AXLandmarkMain"}, | 165 {ui::AX_ROLE_MAIN, @"AXLandmarkMain"}, |
166 {ui::AX_ROLE_NAVIGATION, @"AXLandmarkNavigation"}, | 166 {ui::AX_ROLE_NAVIGATION, @"AXLandmarkNavigation"}, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 delete this; | 312 delete this; |
313 } | 313 } |
314 | 314 |
315 gfx::NativeViewAccessible AXPlatformNodeMac::GetNativeViewAccessible() { | 315 gfx::NativeViewAccessible AXPlatformNodeMac::GetNativeViewAccessible() { |
316 if (!native_node_) | 316 if (!native_node_) |
317 native_node_.reset([[AXPlatformNodeCocoa alloc] initWithNode:this]); | 317 native_node_.reset([[AXPlatformNodeCocoa alloc] initWithNode:this]); |
318 return native_node_.get(); | 318 return native_node_.get(); |
319 } | 319 } |
320 | 320 |
321 } // namespace ui | 321 } // namespace ui |
OLD | NEW |