| 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/dump_accessibility_tree_helper.h" | 5 #include "content/browser/accessibility/dump_accessibility_tree_helper.h" |
| 6 | 6 |
| 7 #include <oleacc.h> | 7 #include <oleacc.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 HRESULT hresult = acc_obj->get_accName(variant_self, &msaa_name_variant); | 35 HRESULT hresult = acc_obj->get_accName(variant_self, &msaa_name_variant); |
| 36 string16 name; | 36 string16 name; |
| 37 if (S_OK == hresult) | 37 if (S_OK == hresult) |
| 38 name = msaa_name_variant.m_str; | 38 name = msaa_name_variant.m_str; |
| 39 | 39 |
| 40 // Get state strings. | 40 // Get state strings. |
| 41 std::vector<string16> state_strings; | 41 std::vector<string16> state_strings; |
| 42 IAccessibleStateToStringVector(acc_obj->ia_state(), &state_strings); | 42 IAccessibleStateToStringVector(acc_obj->ia_state(), &state_strings); |
| 43 IAccessible2StateToStringVector(acc_obj->ia2_state(), &state_strings); | 43 IAccessible2StateToStringVector(acc_obj->ia2_state(), &state_strings); |
| 44 | 44 |
| 45 // Get the description and attributes. | 45 // Get the description, help, and attributes. |
| 46 string16 description; | 46 string16 description; |
| 47 acc_obj->GetStringAttribute(content::AccessibilityNodeData::ATTR_DESCRIPTION, | 47 acc_obj->GetStringAttribute(content::AccessibilityNodeData::ATTR_DESCRIPTION, |
| 48 &description); | 48 &description); |
| 49 string16 help; |
| 50 acc_obj->GetStringAttribute(content::AccessibilityNodeData::ATTR_HELP, &help); |
| 49 const std::vector<string16>& ia2_attributes = acc_obj->ia2_attributes(); | 51 const std::vector<string16>& ia2_attributes = acc_obj->ia2_attributes(); |
| 50 | 52 |
| 51 // Build the line. | 53 // Build the line. |
| 52 StartLine(); | 54 StartLine(); |
| 53 Add(true, IAccessible2RoleToString(acc_obj->ia2_role())); | 55 Add(true, IAccessible2RoleToString(acc_obj->ia2_role())); |
| 54 Add(true, L"name='" + name + L"'"); | 56 Add(true, L"name='" + name + L"'"); |
| 55 for (std::vector<string16>::const_iterator it = state_strings.begin(); | 57 for (std::vector<string16>::const_iterator it = state_strings.begin(); |
| 56 it != state_strings.end(); | 58 it != state_strings.end(); |
| 57 ++it) { | 59 ++it) { |
| 58 Add(false, *it); | 60 Add(false, *it); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 79 } | 81 } |
| 80 | 82 |
| 81 | 83 |
| 82 const std::string DumpAccessibilityTreeHelper::GetAllowString() const { | 84 const std::string DumpAccessibilityTreeHelper::GetAllowString() const { |
| 83 return "@WIN-ALLOW:"; | 85 return "@WIN-ALLOW:"; |
| 84 } | 86 } |
| 85 | 87 |
| 86 const std::string DumpAccessibilityTreeHelper::GetDenyString() const { | 88 const std::string DumpAccessibilityTreeHelper::GetDenyString() const { |
| 87 return "@WIN-DENY:"; | 89 return "@WIN-DENY:"; |
| 88 } | 90 } |
| OLD | NEW |