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

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

Issue 2863703003: A11y: Rename AXSupportedAction to AXDefaultActionVerb. (Closed)
Patch Set: Rebase. Created 3 years, 7 months 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
« no previous file with comments | « ui/accessibility/ax_text_utils.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 *child_count = delegate_->GetChildCount(); 406 *child_count = delegate_->GetChildCount();
407 return S_OK; 407 return S_OK;
408 } 408 }
409 409
410 STDMETHODIMP AXPlatformNodeWin::get_accDefaultAction( 410 STDMETHODIMP AXPlatformNodeWin::get_accDefaultAction(
411 VARIANT var_id, BSTR* def_action) { 411 VARIANT var_id, BSTR* def_action) {
412 AXPlatformNodeWin* target; 412 AXPlatformNodeWin* target;
413 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, def_action, target); 413 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, def_action, target);
414 414
415 int action; 415 int action;
416 if (!target->GetIntAttribute(AX_ATTR_ACTION, &action)) { 416 if (!target->GetIntAttribute(AX_ATTR_DEFAULT_ACTION_VERB, &action)) {
417 *def_action = nullptr; 417 *def_action = nullptr;
418 return S_FALSE; 418 return S_FALSE;
419 } 419 }
420 420
421 base::string16 action_verb = 421 base::string16 action_verb =
422 ActionToString(static_cast<AXSupportedAction>(action)); 422 ActionVerbToLocalizedString(static_cast<AXDefaultActionVerb>(action));
423 if (action_verb.empty()) { 423 if (action_verb.empty()) {
424 *def_action = nullptr; 424 *def_action = nullptr;
425 return S_FALSE; 425 return S_FALSE;
426 } 426 }
427 427
428 *def_action = SysAllocString(action_verb.c_str()); 428 *def_action = SysAllocString(action_verb.c_str());
429 DCHECK(def_action); 429 DCHECK(def_action);
430 return S_OK; 430 return S_OK;
431 } 431 }
432 432
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 1289
1290 AXPlatformNodeBase* base = 1290 AXPlatformNodeBase* base =
1291 FromNativeViewAccessible(node->GetNativeViewAccessible()); 1291 FromNativeViewAccessible(node->GetNativeViewAccessible());
1292 if (base && !IsDescendant(base)) 1292 if (base && !IsDescendant(base))
1293 base = nullptr; 1293 base = nullptr;
1294 1294
1295 return static_cast<AXPlatformNodeWin*>(base); 1295 return static_cast<AXPlatformNodeWin*>(base);
1296 } 1296 }
1297 1297
1298 } // namespace ui 1298 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_text_utils.cc ('k') | ui/views/controls/button/checkbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698