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 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
12 #import "ui/accessibility/ax_node_data.h" | 12 #import "ui/accessibility/ax_node_data.h" |
13 #import "ui/accessibility/platform/ax_platform_node_delegate.h" | 13 #import "ui/accessibility/platform/ax_platform_node_delegate.h" |
14 #import "ui/gfx/mac/coordinate_conversion.h" | 14 #import "ui/gfx/mac/coordinate_conversion.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 struct MapEntry { | 18 struct MapEntry { |
19 ui::AXRole value; | 19 ui::AXRole value; |
20 NSString* nativeValue; | 20 NSString* nativeValue; |
21 }; | 21 }; |
22 | 22 |
23 typedef std::map<ui::AXRole, NSString*> RoleMap; | 23 typedef std::map<ui::AXRole, NSString*> RoleMap; |
24 | 24 |
25 RoleMap BuildRoleMap() { | 25 RoleMap BuildRoleMap() { |
26 const MapEntry roles[] = { | 26 const MapEntry roles[] = { |
| 27 {ui::AX_ROLE_ABBR, NSAccessibilityGroupRole}, |
27 {ui::AX_ROLE_ALERT, NSAccessibilityGroupRole}, | 28 {ui::AX_ROLE_ALERT, NSAccessibilityGroupRole}, |
28 {ui::AX_ROLE_ALERT_DIALOG, NSAccessibilityGroupRole}, | 29 {ui::AX_ROLE_ALERT_DIALOG, NSAccessibilityGroupRole}, |
29 {ui::AX_ROLE_ANNOTATION, NSAccessibilityUnknownRole}, | 30 {ui::AX_ROLE_ANNOTATION, NSAccessibilityUnknownRole}, |
30 {ui::AX_ROLE_APPLICATION, NSAccessibilityGroupRole}, | 31 {ui::AX_ROLE_APPLICATION, NSAccessibilityGroupRole}, |
31 {ui::AX_ROLE_ARTICLE, NSAccessibilityGroupRole}, | 32 {ui::AX_ROLE_ARTICLE, NSAccessibilityGroupRole}, |
32 {ui::AX_ROLE_BANNER, NSAccessibilityGroupRole}, | 33 {ui::AX_ROLE_BANNER, NSAccessibilityGroupRole}, |
33 {ui::AX_ROLE_BLOCKQUOTE, NSAccessibilityGroupRole}, | 34 {ui::AX_ROLE_BLOCKQUOTE, NSAccessibilityGroupRole}, |
34 {ui::AX_ROLE_BUSY_INDICATOR, NSAccessibilityBusyIndicatorRole}, | 35 {ui::AX_ROLE_BUSY_INDICATOR, NSAccessibilityBusyIndicatorRole}, |
35 {ui::AX_ROLE_BUTTON, NSAccessibilityButtonRole}, | 36 {ui::AX_ROLE_BUTTON, NSAccessibilityButtonRole}, |
36 {ui::AX_ROLE_CANVAS, NSAccessibilityImageRole}, | 37 {ui::AX_ROLE_CANVAS, NSAccessibilityImageRole}, |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 void AXPlatformNodeMac::NotifyAccessibilityEvent(ui::AXEvent event_type) { | 337 void AXPlatformNodeMac::NotifyAccessibilityEvent(ui::AXEvent event_type) { |
337 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 338 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
338 } | 339 } |
339 | 340 |
340 int AXPlatformNodeMac::GetIndexInParent() { | 341 int AXPlatformNodeMac::GetIndexInParent() { |
341 // TODO(dmazzoni): implement this. http://crbug.com/396137 | 342 // TODO(dmazzoni): implement this. http://crbug.com/396137 |
342 return -1; | 343 return -1; |
343 } | 344 } |
344 | 345 |
345 } // namespace ui | 346 } // namespace ui |
OLD | NEW |