OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/accessibility/native_view_accessibility_win.h" | 5 #include "views/accessibility/native_view_accessibility_win.h" |
6 | 6 |
7 #include "ui/base/accessibility/accessible_view_state.h" | 7 #include "ui/base/accessibility/accessible_view_state.h" |
8 #include "ui/base/view_prop.h" | 8 #include "ui/base/view_prop.h" |
9 #include "views/controls/button/native_button.h" | 9 #include "views/controls/button/native_button.h" |
10 #include "views/widget/native_widget_win.h" | 10 #include "views/widget/native_widget_win.h" |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 msaa_state->lVal = 0; | 533 msaa_state->lVal = 0; |
534 | 534 |
535 // Default state; all views can have accessibility focus. | 535 // Default state; all views can have accessibility focus. |
536 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE; | 536 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE; |
537 | 537 |
538 if (!view) | 538 if (!view) |
539 return; | 539 return; |
540 | 540 |
541 if (!view->IsEnabled()) | 541 if (!view->IsEnabled()) |
542 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE; | 542 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE; |
543 if (!view->IsVisible()) | 543 if (!view->visible()) |
544 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE; | 544 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE; |
545 if (view->IsHotTracked()) | 545 if (view->IsHotTracked()) |
546 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED; | 546 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED; |
547 if (view->HasFocus()) | 547 if (view->HasFocus()) |
548 msaa_state->lVal |= STATE_SYSTEM_FOCUSED; | 548 msaa_state->lVal |= STATE_SYSTEM_FOCUSED; |
549 | 549 |
550 // Add on any view-specific states. | 550 // Add on any view-specific states. |
551 ui::AccessibleViewState view_state; | 551 ui::AccessibleViewState view_state; |
552 view->GetAccessibleState(&view_state); | 552 view->GetAccessibleState(&view_state); |
553 msaa_state->lVal |= MSAAState(view_state.state); | 553 msaa_state->lVal |= MSAAState(view_state.state); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 HWND native_view_window , IAccessible** accessible) { | 746 HWND native_view_window , IAccessible** accessible) { |
747 if (IsWindow(native_view_window)) { | 747 if (IsWindow(native_view_window)) { |
748 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, | 748 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, |
749 OBJID_CLIENT); | 749 OBJID_CLIENT); |
750 return ObjectFromLresult(ret, IID_IDispatch, 0, | 750 return ObjectFromLresult(ret, IID_IDispatch, 0, |
751 reinterpret_cast<void**>(accessible)); | 751 reinterpret_cast<void**>(accessible)); |
752 } | 752 } |
753 | 753 |
754 return E_FAIL; | 754 return E_FAIL; |
755 } | 755 } |
OLD | NEW |