Chromium Code Reviews| 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 531 COM_OBJECT_VALIDATE_VAR_ID_AND_GET_TARGET(var_id, target); | 531 COM_OBJECT_VALIDATE_VAR_ID_AND_GET_TARGET(var_id, target); |
| 532 | 532 |
| 533 AXActionData data; | 533 AXActionData data; |
| 534 data.action = ui::AX_ACTION_SET_VALUE; | 534 data.action = ui::AX_ACTION_SET_VALUE; |
| 535 data.value = new_value; | 535 data.value = new_value; |
| 536 if (target->delegate_->AccessibilityPerformAction(data)) | 536 if (target->delegate_->AccessibilityPerformAction(data)) |
| 537 return S_OK; | 537 return S_OK; |
| 538 return E_FAIL; | 538 return E_FAIL; |
| 539 } | 539 } |
| 540 | 540 |
| 541 // IAccessible functions not supported. | |
| 542 | |
| 543 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) { | 541 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) { |
| 544 COM_OBJECT_VALIDATE_1_ARG(selected); | 542 COM_OBJECT_VALIDATE_1_ARG(selected); |
| 545 if (selected) | 543 if (selected) |
| 546 selected->vt = VT_EMPTY; | 544 selected->vt = VT_EMPTY; |
| 547 return E_NOTIMPL; | 545 return E_NOTIMPL; |
| 548 } | 546 } |
| 549 | 547 |
| 550 STDMETHODIMP AXPlatformNodeWin::accSelect( | 548 STDMETHODIMP AXPlatformNodeWin::accSelect( |
| 551 LONG flagsSelect, VARIANT var_id) { | 549 LONG flagsSelect, VARIANT var_id) { |
| 552 return E_NOTIMPL; | 550 AXPlatformNodeWin* target; |
| 551 COM_OBJECT_VALIDATE_VAR_ID_AND_GET_TARGET(var_id, target); | |
| 552 | |
| 553 if (flagsSelect & SELFLAG_TAKEFOCUS) { | |
| 554 ui::AXActionData action_data; | |
| 555 action_data.action = ui::AX_ACTION_FOCUS; | |
| 556 action_data.target_node_id = unique_id_; | |
|
dmazzoni
2017/05/30 15:24:04
Wrong id - this should be GetData().id() - but act
| |
| 557 target->delegate_->AccessibilityPerformAction(action_data); | |
| 558 return S_OK; | |
| 559 } | |
| 560 | |
| 561 return S_FALSE; | |
| 553 } | 562 } |
| 554 | 563 |
| 555 STDMETHODIMP AXPlatformNodeWin::get_accHelpTopic( | 564 STDMETHODIMP AXPlatformNodeWin::get_accHelpTopic( |
| 556 BSTR* help_file, VARIANT var_id, LONG* topic_id) { | 565 BSTR* help_file, VARIANT var_id, LONG* topic_id) { |
| 557 AXPlatformNodeWin* target; | 566 AXPlatformNodeWin* target; |
| 558 COM_OBJECT_VALIDATE_VAR_ID_2_ARGS_AND_GET_TARGET(var_id, help_file, topic_id, | 567 COM_OBJECT_VALIDATE_VAR_ID_2_ARGS_AND_GET_TARGET(var_id, help_file, topic_id, |
| 559 target); | 568 target); |
| 560 if (help_file) { | 569 if (help_file) { |
| 561 *help_file = nullptr; | 570 *help_file = nullptr; |
| 562 } | 571 } |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1293 | 1302 |
| 1294 AXPlatformNodeBase* base = | 1303 AXPlatformNodeBase* base = |
| 1295 FromNativeViewAccessible(node->GetNativeViewAccessible()); | 1304 FromNativeViewAccessible(node->GetNativeViewAccessible()); |
| 1296 if (base && !IsDescendant(base)) | 1305 if (base && !IsDescendant(base)) |
| 1297 base = nullptr; | 1306 base = nullptr; |
| 1298 | 1307 |
| 1299 return static_cast<AXPlatformNodeWin*>(base); | 1308 return static_cast<AXPlatformNodeWin*>(base); |
| 1300 } | 1309 } |
| 1301 | 1310 |
| 1302 } // namespace ui | 1311 } // namespace ui |
| OLD | NEW |