| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/accessibility/accessibility_tree_formatter_utils_win.h
" | 5 #include "content/browser/accessibility/accessibility_tree_formatter_utils_win.h
" |
| 6 | 6 |
| 7 #include <oleacc.h> | 7 #include <oleacc.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // static | 37 // static |
| 38 AccessibilityRoleStateMap* AccessibilityRoleStateMap::GetInstance() { | 38 AccessibilityRoleStateMap* AccessibilityRoleStateMap::GetInstance() { |
| 39 return Singleton<AccessibilityRoleStateMap, | 39 return Singleton<AccessibilityRoleStateMap, |
| 40 LeakySingletonTraits<AccessibilityRoleStateMap> >::get(); | 40 LeakySingletonTraits<AccessibilityRoleStateMap> >::get(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 AccessibilityRoleStateMap::AccessibilityRoleStateMap() { | 43 AccessibilityRoleStateMap::AccessibilityRoleStateMap() { |
| 44 // Convenience macros for generating readable strings. | 44 // Convenience macros for generating readable strings. |
| 45 #define IA_ROLE_MAP(x) ia_role_string_map[x] = L#x; \ | 45 #define IA_ROLE_MAP(x) ia_role_string_map[x] = L###x; \ |
| 46 ia2_role_string_map[x] = L#x; | 46 ia2_role_string_map[x] = L###x; |
| 47 #define IA2_ROLE_MAP(x) ia2_role_string_map[x] = L#x; | 47 #define IA2_ROLE_MAP(x) ia2_role_string_map[x] = L###x; |
| 48 #define IA_STATE_MAP(x) ia_state_string_map[STATE_SYSTEM_##x] = L#x; | 48 #define IA_STATE_MAP(x) ia_state_string_map[STATE_SYSTEM_##x] = L###x; |
| 49 #define IA2_STATE_MAP(x) ia2_state_string_map[x] = L#x; | 49 #define IA2_STATE_MAP(x) ia2_state_string_map[x] = L###x; |
| 50 | 50 |
| 51 // MSAA / IAccessible roles. Each one of these is also a valid | 51 // MSAA / IAccessible roles. Each one of these is also a valid |
| 52 // IAccessible2 role, the IA_ROLE_MAP macro adds it to both. | 52 // IAccessible2 role, the IA_ROLE_MAP macro adds it to both. |
| 53 IA_ROLE_MAP(ROLE_SYSTEM_ALERT) | 53 IA_ROLE_MAP(ROLE_SYSTEM_ALERT) |
| 54 IA_ROLE_MAP(ROLE_SYSTEM_ANIMATION) | 54 IA_ROLE_MAP(ROLE_SYSTEM_ANIMATION) |
| 55 IA_ROLE_MAP(ROLE_SYSTEM_APPLICATION) | 55 IA_ROLE_MAP(ROLE_SYSTEM_APPLICATION) |
| 56 IA_ROLE_MAP(ROLE_SYSTEM_BORDER) | 56 IA_ROLE_MAP(ROLE_SYSTEM_BORDER) |
| 57 IA_ROLE_MAP(ROLE_SYSTEM_BUTTONDROPDOWN) | 57 IA_ROLE_MAP(ROLE_SYSTEM_BUTTONDROPDOWN) |
| 58 IA_ROLE_MAP(ROLE_SYSTEM_BUTTONDROPDOWNGRID) | 58 IA_ROLE_MAP(ROLE_SYSTEM_BUTTONDROPDOWNGRID) |
| 59 IA_ROLE_MAP(ROLE_SYSTEM_BUTTONMENU) | 59 IA_ROLE_MAP(ROLE_SYSTEM_BUTTONMENU) |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 base::string16 IAccessible2StateToString(int32 ia2_state) { | 259 base::string16 IAccessible2StateToString(int32 ia2_state) { |
| 260 std::vector<base::string16> strings; | 260 std::vector<base::string16> strings; |
| 261 IAccessible2StateToStringVector(ia2_state, &strings); | 261 IAccessible2StateToStringVector(ia2_state, &strings); |
| 262 return JoinString(strings, ','); | 262 return JoinString(strings, ','); |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace content | 265 } // namespace content |
| OLD | NEW |