| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/accessibility/native_view_accessibility_win.h" | 5 #include "ui/views/accessibility/native_view_accessibility_win.h" |
| 6 | 6 |
| 7 #include <oleacc.h> | 7 #include <oleacc.h> |
| 8 #include <UIAutomationClient.h> | 8 #include <UIAutomationClient.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 } | 522 } |
| 523 } | 523 } |
| 524 | 524 |
| 525 if (!child_view) { | 525 if (!child_view) { |
| 526 // No child found. | 526 // No child found. |
| 527 *disp_child = NULL; | 527 *disp_child = NULL; |
| 528 return E_FAIL; | 528 return E_FAIL; |
| 529 } | 529 } |
| 530 | 530 |
| 531 *disp_child = child_view->GetNativeViewAccessible(); | 531 *disp_child = child_view->GetNativeViewAccessible(); |
| 532 (*disp_child)->AddRef(); | 532 if (*disp_child) { |
| 533 return S_OK; | 533 (*disp_child)->AddRef(); |
| 534 return S_OK; |
| 535 } |
| 536 |
| 537 return E_FAIL; |
| 534 } | 538 } |
| 535 | 539 |
| 536 STDMETHODIMP NativeViewAccessibilityWin::get_accChildCount(LONG* child_count) { | 540 STDMETHODIMP NativeViewAccessibilityWin::get_accChildCount(LONG* child_count) { |
| 537 if (!child_count) | 541 if (!child_count) |
| 538 return E_INVALIDARG; | 542 return E_INVALIDARG; |
| 539 | 543 |
| 540 if (!view_ || !view_->GetWidget()) | 544 if (!view_ || !view_->GetWidget()) |
| 541 return E_FAIL; | 545 return E_FAIL; |
| 542 | 546 |
| 543 *child_count = view_->child_count(); | 547 *child_count = view_->child_count(); |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 if (view == NULL || view == view_) { | 1531 if (view == NULL || view == view_) { |
| 1528 alert_target_view_storage_ids_.erase( | 1532 alert_target_view_storage_ids_.erase( |
| 1529 alert_target_view_storage_ids_.begin() + i); | 1533 alert_target_view_storage_ids_.begin() + i); |
| 1530 } else { | 1534 } else { |
| 1531 ++i; | 1535 ++i; |
| 1532 } | 1536 } |
| 1533 } | 1537 } |
| 1534 } | 1538 } |
| 1535 | 1539 |
| 1536 } // namespace views | 1540 } // namespace views |
| OLD | NEW |