| 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.h" | 5 #include "content/browser/accessibility/accessibility_tree_formatter.h" |
| 6 | 6 |
| 7 #include <oleacc.h> | 7 #include <oleacc.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // S_FALSE will be returned if no embedded object is found at the given | 125 // S_FALSE will be returned if no embedded object is found at the given |
| 126 // embedded character offset. Exclude child index from such cases. | 126 // embedded character offset. Exclude child index from such cases. |
| 127 LONG child_index = -1; | 127 LONG child_index = -1; |
| 128 if (hr == S_OK) { | 128 if (hr == S_OK) { |
| 129 DCHECK_GE(index_of_embed, 0); | 129 DCHECK_GE(index_of_embed, 0); |
| 130 base::win::ScopedComPtr<IAccessibleHyperlink> embedded_object; | 130 base::win::ScopedComPtr<IAccessibleHyperlink> embedded_object; |
| 131 hr = ax_object.get_hyperlink( | 131 hr = ax_object.get_hyperlink( |
| 132 index_of_embed, embedded_object.Receive()); | 132 index_of_embed, embedded_object.Receive()); |
| 133 DCHECK(SUCCEEDED(hr)); | 133 DCHECK(SUCCEEDED(hr)); |
| 134 base::win::ScopedComPtr<IAccessible2> ax_embed; | 134 base::win::ScopedComPtr<IAccessible2> ax_embed; |
| 135 hr = embedded_object.QueryInterface(ax_embed.Receive()); | 135 hr = embedded_object.CopyTo(ax_embed.Receive()); |
| 136 DCHECK(SUCCEEDED(hr)); | 136 DCHECK(SUCCEEDED(hr)); |
| 137 hr = ax_embed->get_indexInParent(&child_index); | 137 hr = ax_embed->get_indexInParent(&child_index); |
| 138 DCHECK(SUCCEEDED(hr)); | 138 DCHECK(SUCCEEDED(hr)); |
| 139 } | 139 } |
| 140 | 140 |
| 141 base::string16 child_index_str(L"<obj"); | 141 base::string16 child_index_str(L"<obj"); |
| 142 if (child_index >= 0) { | 142 if (child_index >= 0) { |
| 143 base::StringAppendF(&child_index_str, L"%d>", child_index); | 143 base::StringAppendF(&child_index_str, L"%d>", child_index); |
| 144 } else { | 144 } else { |
| 145 base::StringAppendF(&child_index_str, L">"); | 145 base::StringAppendF(&child_index_str, L">"); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 const std::string AccessibilityTreeFormatterWin::GetAllowString() { | 448 const std::string AccessibilityTreeFormatterWin::GetAllowString() { |
| 449 return "@WIN-ALLOW:"; | 449 return "@WIN-ALLOW:"; |
| 450 } | 450 } |
| 451 | 451 |
| 452 const std::string AccessibilityTreeFormatterWin::GetDenyString() { | 452 const std::string AccessibilityTreeFormatterWin::GetDenyString() { |
| 453 return "@WIN-DENY:"; | 453 return "@WIN-DENY:"; |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace content | 456 } // namespace content |
| OLD | NEW |