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

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: Return things to prevent compile errors. Created 4 years 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 if (delegate_->AccessibilityPerformAction(data))
458 return S_OK; 461 return S_OK;
459 return E_FAIL; 462 return E_FAIL;
460 } 463 }
461 464
462 // IAccessible functions not supported. 465 // IAccessible functions not supported.
463 466
464 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) { 467 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) {
465 COM_OBJECT_VALIDATE_1_ARG(selected); 468 COM_OBJECT_VALIDATE_1_ARG(selected);
466 if (selected) 469 if (selected)
467 selected->vt = VT_EMPTY; 470 selected->vt = VT_EMPTY;
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 ui::TextBoundaryDirection direction) { 1150 ui::TextBoundaryDirection direction) {
1148 HandleSpecialTextOffset(text, &start_offset); 1151 HandleSpecialTextOffset(text, &start_offset);
1149 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1152 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1150 std::vector<int32_t> line_breaks; 1153 std::vector<int32_t> line_breaks;
1151 return static_cast<LONG>(ui::FindAccessibleTextBoundary( 1154 return static_cast<LONG>(ui::FindAccessibleTextBoundary(
1152 text, line_breaks, boundary, start_offset, direction, 1155 text, line_breaks, boundary, start_offset, direction,
1153 AX_TEXT_AFFINITY_DOWNSTREAM)); 1156 AX_TEXT_AFFINITY_DOWNSTREAM));
1154 } 1157 }
1155 1158
1156 } // namespace ui 1159 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698