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/public/test/accessibility_test_utils_win.h" | 5 #include "content/public/test/accessibility_test_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> |
11 | 11 |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "third_party/iaccessible2/ia2_api_all.h" | 14 #include "third_party/iaccessible2/ia2_api_all.h" |
15 | 15 |
| 16 namespace content { |
16 namespace { | 17 namespace { |
17 | 18 |
18 class AccessibilityRoleStateMap { | 19 class AccessibilityRoleStateMap { |
19 public: | 20 public: |
20 static AccessibilityRoleStateMap* GetInstance(); | 21 static AccessibilityRoleStateMap* GetInstance(); |
21 | 22 |
22 std::map<int32, string16> ia_role_string_map; | 23 std::map<int32, string16> ia_role_string_map; |
23 std::map<int32, string16> ia2_role_string_map; | 24 std::map<int32, string16> ia2_role_string_map; |
24 std::map<int32, string16> ia_state_string_map; | 25 std::map<int32, string16> ia_state_string_map; |
25 std::map<int32, string16> ia2_state_string_map; | 26 std::map<int32, string16> ia2_state_string_map; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 if (it->first & ia2_state) | 257 if (it->first & ia2_state) |
257 result->push_back(it->second); | 258 result->push_back(it->second); |
258 } | 259 } |
259 } | 260 } |
260 | 261 |
261 string16 IAccessible2StateToString(int32 ia2_state) { | 262 string16 IAccessible2StateToString(int32 ia2_state) { |
262 std::vector<string16> strings; | 263 std::vector<string16> strings; |
263 IAccessible2StateToStringVector(ia2_state, &strings); | 264 IAccessible2StateToStringVector(ia2_state, &strings); |
264 return JoinString(strings, ','); | 265 return JoinString(strings, ','); |
265 } | 266 } |
| 267 |
| 268 } // namespace content |
OLD | NEW |