| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |