| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 *child_count = delegate_->GetChildCount(); | 411 *child_count = delegate_->GetChildCount(); |
| 412 return S_OK; | 412 return S_OK; |
| 413 } | 413 } |
| 414 | 414 |
| 415 STDMETHODIMP AXPlatformNodeWin::get_accDefaultAction( | 415 STDMETHODIMP AXPlatformNodeWin::get_accDefaultAction( |
| 416 VARIANT var_id, BSTR* def_action) { | 416 VARIANT var_id, BSTR* def_action) { |
| 417 AXPlatformNodeWin* target; | 417 AXPlatformNodeWin* target; |
| 418 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, def_action, target); | 418 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, def_action, target); |
| 419 | 419 |
| 420 int action; | 420 int action; |
| 421 if (!target->GetIntAttribute(AX_ATTR_ACTION, &action)) { | 421 if (!target->GetIntAttribute(AX_ATTR_DEFAULT_ACTION_VERB, &action)) { |
| 422 *def_action = nullptr; | 422 *def_action = nullptr; |
| 423 return S_FALSE; | 423 return S_FALSE; |
| 424 } | 424 } |
| 425 | 425 |
| 426 base::string16 action_verb = | 426 base::string16 action_verb = |
| 427 ActionToString(static_cast<AXSupportedAction>(action)); | 427 ActionToString(static_cast<AXDefaultActionVerb>(action)); |
| 428 if (action_verb.empty()) { | 428 if (action_verb.empty()) { |
| 429 *def_action = nullptr; | 429 *def_action = nullptr; |
| 430 return S_FALSE; | 430 return S_FALSE; |
| 431 } | 431 } |
| 432 | 432 |
| 433 *def_action = SysAllocString(action_verb.c_str()); | 433 *def_action = SysAllocString(action_verb.c_str()); |
| 434 DCHECK(def_action); | 434 DCHECK(def_action); |
| 435 return S_OK; | 435 return S_OK; |
| 436 } | 436 } |
| 437 | 437 |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 | 1290 |
| 1291 AXPlatformNodeBase* base = | 1291 AXPlatformNodeBase* base = |
| 1292 FromNativeViewAccessible(node->GetNativeViewAccessible()); | 1292 FromNativeViewAccessible(node->GetNativeViewAccessible()); |
| 1293 if (base && !IsDescendant(base)) | 1293 if (base && !IsDescendant(base)) |
| 1294 base = nullptr; | 1294 base = nullptr; |
| 1295 | 1295 |
| 1296 return static_cast<AXPlatformNodeWin*>(base); | 1296 return static_cast<AXPlatformNodeWin*>(base); |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 } // namespace ui | 1299 } // namespace ui |
| OLD | NEW |