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

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

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with ariaTextAlternative Created 5 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 <oleacc.h> 7 #include <oleacc.h>
8 8
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 VARIANT var_id, VARIANT* state) { 415 VARIANT var_id, VARIANT* state) {
416 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, state); 416 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, state);
417 state->vt = VT_I4; 417 state->vt = VT_I4;
418 state->lVal = MSAAState(); 418 state->lVal = MSAAState();
419 return S_OK; 419 return S_OK;
420 } 420 }
421 421
422 STDMETHODIMP AXPlatformNodeWin::get_accHelp( 422 STDMETHODIMP AXPlatformNodeWin::get_accHelp(
423 VARIANT var_id, BSTR* help) { 423 VARIANT var_id, BSTR* help) {
424 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, help); 424 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, help);
425 return GetStringAttributeAsBstr(ui::AX_ATTR_HELP, help); 425 return S_FALSE;
426 } 426 }
427 427
428 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) { 428 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) {
429 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, value); 429 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, value);
430 return GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value); 430 return GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value);
431 } 431 }
432 432
433 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id, 433 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id,
434 BSTR new_value) { 434 BSTR new_value) {
435 COM_OBJECT_VALIDATE_VAR_ID(var_id); 435 COM_OBJECT_VALIDATE_VAR_ID(var_id);
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 LONG start_offset, 1102 LONG start_offset,
1103 ui::TextBoundaryDirection direction) { 1103 ui::TextBoundaryDirection direction) {
1104 HandleSpecialTextOffset(text, &start_offset); 1104 HandleSpecialTextOffset(text, &start_offset);
1105 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1105 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1106 std::vector<int32> line_breaks; 1106 std::vector<int32> line_breaks;
1107 return static_cast<LONG>(ui::FindAccessibleTextBoundary( 1107 return static_cast<LONG>(ui::FindAccessibleTextBoundary(
1108 text, line_breaks, boundary, start_offset, direction)); 1108 text, line_breaks, boundary, start_offset, direction));
1109 } 1109 }
1110 1110
1111 } // namespace ui 1111 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_mac.mm ('k') | ui/accessibility/platform/ax_platform_node_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698