OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <atlbase.h> | 5 #include <atlbase.h> |
6 #include <atlcom.h> | 6 #include <atlcom.h> |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <oleacc.h> | 8 #include <oleacc.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 } | 455 } |
456 | 456 |
457 return S_OK; | 457 return S_OK; |
458 } | 458 } |
459 | 459 |
460 STDMETHODIMP AXPlatformNodeWin::get_accKeyboardShortcut( | 460 STDMETHODIMP AXPlatformNodeWin::get_accKeyboardShortcut( |
461 VARIANT var_id, BSTR* acc_key) { | 461 VARIANT var_id, BSTR* acc_key) { |
462 AXPlatformNodeWin* target; | 462 AXPlatformNodeWin* target; |
463 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, acc_key, target); | 463 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, acc_key, target); |
464 | 464 |
465 return target->GetStringAttributeAsBstr(ui::AX_ATTR_SHORTCUT, acc_key); | 465 return target->GetStringAttributeAsBstr(ui::AX_ATTR_KEY_SHORTCUTS, acc_key); |
466 } | 466 } |
467 | 467 |
468 STDMETHODIMP AXPlatformNodeWin::get_accName( | 468 STDMETHODIMP AXPlatformNodeWin::get_accName( |
469 VARIANT var_id, BSTR* name) { | 469 VARIANT var_id, BSTR* name) { |
470 AXPlatformNodeWin* target; | 470 AXPlatformNodeWin* target; |
471 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, name, target); | 471 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, name, target); |
472 | 472 |
473 HRESULT result = target->GetStringAttributeAsBstr(ui::AX_ATTR_NAME, name); | 473 HRESULT result = target->GetStringAttributeAsBstr(ui::AX_ATTR_NAME, name); |
474 if (FAILED(result) && MSAARole() == ROLE_SYSTEM_DOCUMENT && GetParent()) { | 474 if (FAILED(result) && MSAARole() == ROLE_SYSTEM_DOCUMENT && GetParent()) { |
475 // Hack: Some versions of JAWS crash if they get an empty name on | 475 // Hack: Some versions of JAWS crash if they get an empty name on |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 | 1715 |
1716 AXPlatformNodeBase* base = | 1716 AXPlatformNodeBase* base = |
1717 FromNativeViewAccessible(node->GetNativeViewAccessible()); | 1717 FromNativeViewAccessible(node->GetNativeViewAccessible()); |
1718 if (base && !IsDescendant(base)) | 1718 if (base && !IsDescendant(base)) |
1719 base = nullptr; | 1719 base = nullptr; |
1720 | 1720 |
1721 return static_cast<AXPlatformNodeWin*>(base); | 1721 return static_cast<AXPlatformNodeWin*>(base); |
1722 } | 1722 } |
1723 | 1723 |
1724 } // namespace ui | 1724 } // namespace ui |
OLD | NEW |