Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: ui/accessibility/platform/ax_platform_node_win.cc

Issue 2474363002: MacViews/a11y: Accessibility actions use AXActionData in AXPlatformNodeDelegate. (Closed)
Patch Set: Fix Linux. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 return S_FALSE; 446 return S_FALSE;
447 } 447 }
448 448
449 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) { 449 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) {
450 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, value); 450 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, value);
451 return GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value); 451 return GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value);
452 } 452 }
453 453
454 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id, 454 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id,
455 BSTR new_value) { 455 BSTR new_value) {
456 AXActionData data;
457 data.action = ui::AX_ACTION_SET_VALUE;
458 data.value = new_value;
456 COM_OBJECT_VALIDATE_VAR_ID(var_id); 459 COM_OBJECT_VALIDATE_VAR_ID(var_id);
457 if (delegate_->SetStringValue(new_value, true)) 460 delegate_->AccessibilityPerformAction(data);
458 return S_OK; 461 return S_OK;
459 return E_FAIL;
460 } 462 }
461 463
462 // IAccessible functions not supported. 464 // IAccessible functions not supported.
463 465
464 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) { 466 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) {
465 COM_OBJECT_VALIDATE_1_ARG(selected); 467 COM_OBJECT_VALIDATE_1_ARG(selected);
466 if (selected) 468 if (selected)
467 selected->vt = VT_EMPTY; 469 selected->vt = VT_EMPTY;
468 return E_NOTIMPL; 470 return E_NOTIMPL;
469 } 471 }
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 ui::TextBoundaryDirection direction) { 1149 ui::TextBoundaryDirection direction) {
1148 HandleSpecialTextOffset(text, &start_offset); 1150 HandleSpecialTextOffset(text, &start_offset);
1149 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1151 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1150 std::vector<int32_t> line_breaks; 1152 std::vector<int32_t> line_breaks;
1151 return static_cast<LONG>(ui::FindAccessibleTextBoundary( 1153 return static_cast<LONG>(ui::FindAccessibleTextBoundary(
1152 text, line_breaks, boundary, start_offset, direction, 1154 text, line_breaks, boundary, start_offset, direction,
1153 AX_TEXT_AFFINITY_DOWNSTREAM)); 1155 AX_TEXT_AFFINITY_DOWNSTREAM));
1154 } 1156 }
1155 1157
1156 } // namespace ui 1158 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698