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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
502 VARIANT var_id, VARIANT* state) { | 502 VARIANT var_id, VARIANT* state) { |
503 AXPlatformNodeWin* target; | 503 AXPlatformNodeWin* target; |
504 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, state, target); | 504 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, state, target); |
505 state->vt = VT_I4; | 505 state->vt = VT_I4; |
506 state->lVal = target->MSAAState(); | 506 state->lVal = target->MSAAState(); |
507 return S_OK; | 507 return S_OK; |
508 } | 508 } |
509 | 509 |
510 STDMETHODIMP AXPlatformNodeWin::get_accHelp( | 510 STDMETHODIMP AXPlatformNodeWin::get_accHelp( |
511 VARIANT var_id, BSTR* help) { | 511 VARIANT var_id, BSTR* help) { |
512 if (!help) | |
dmazzoni
2017/05/01 16:16:26
Use COM_OBJECT_VALIDATE instead?
| |
513 return E_INVALIDARG; | |
512 return S_FALSE; | 514 return S_FALSE; |
513 } | 515 } |
514 | 516 |
515 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) { | 517 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) { |
516 AXPlatformNodeWin* target; | 518 AXPlatformNodeWin* target; |
517 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, value, target); | 519 COM_OBJECT_VALIDATE_VAR_ID_1_ARG_AND_GET_TARGET(var_id, value, target); |
518 return target->GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value); | 520 return target->GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value); |
519 } | 521 } |
520 | 522 |
521 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id, | 523 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id, |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1281 | 1283 |
1282 AXPlatformNodeBase* base = | 1284 AXPlatformNodeBase* base = |
1283 FromNativeViewAccessible(node->GetNativeViewAccessible()); | 1285 FromNativeViewAccessible(node->GetNativeViewAccessible()); |
1284 if (base && !IsDescendant(base)) | 1286 if (base && !IsDescendant(base)) |
1285 base = nullptr; | 1287 base = nullptr; |
1286 | 1288 |
1287 return static_cast<AXPlatformNodeWin*>(base); | 1289 return static_cast<AXPlatformNodeWin*>(base); |
1288 } | 1290 } |
1289 | 1291 |
1290 } // namespace ui | 1292 } // namespace ui |
OLD | NEW |