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 "content/browser/accessibility/browser_accessibility_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_win.h" |
6 | 6 |
7 #include <UIAutomationClient.h> | 7 #include <UIAutomationClient.h> |
8 #include <UIAutomationCoreApi.h> | 8 #include <UIAutomationCoreApi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 4664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4675 if (HasState(ui::AX_STATE_PROTECTED)) | 4675 if (HasState(ui::AX_STATE_PROTECTED)) |
4676 ia_state |= STATE_SYSTEM_PROTECTED; | 4676 ia_state |= STATE_SYSTEM_PROTECTED; |
4677 if (HasState(ui::AX_STATE_REQUIRED)) | 4677 if (HasState(ui::AX_STATE_REQUIRED)) |
4678 ia2_state |= IA2_STATE_REQUIRED; | 4678 ia2_state |= IA2_STATE_REQUIRED; |
4679 if (HasState(ui::AX_STATE_SELECTABLE)) | 4679 if (HasState(ui::AX_STATE_SELECTABLE)) |
4680 ia_state |= STATE_SYSTEM_SELECTABLE; | 4680 ia_state |= STATE_SYSTEM_SELECTABLE; |
4681 if (HasState(ui::AX_STATE_SELECTED)) | 4681 if (HasState(ui::AX_STATE_SELECTED)) |
4682 ia_state |= STATE_SYSTEM_SELECTED; | 4682 ia_state |= STATE_SYSTEM_SELECTED; |
4683 if (HasState(ui::AX_STATE_VISITED)) | 4683 if (HasState(ui::AX_STATE_VISITED)) |
4684 ia_state |= STATE_SYSTEM_TRAVERSED; | 4684 ia_state |= STATE_SYSTEM_TRAVERSED; |
4685 if (!HasState(ui::AX_STATE_ENABLED)) | 4685 if (HasState(ui::AX_STATE_DISABLED)) |
4686 ia_state |= STATE_SYSTEM_UNAVAILABLE; | 4686 ia_state |= STATE_SYSTEM_UNAVAILABLE; |
4687 if (HasState(ui::AX_STATE_VERTICAL)) | 4687 if (HasState(ui::AX_STATE_VERTICAL)) |
4688 ia2_state |= IA2_STATE_VERTICAL; | 4688 ia2_state |= IA2_STATE_VERTICAL; |
4689 if (HasState(ui::AX_STATE_HORIZONTAL)) | 4689 if (HasState(ui::AX_STATE_HORIZONTAL)) |
4690 ia2_state |= IA2_STATE_HORIZONTAL; | 4690 ia2_state |= IA2_STATE_HORIZONTAL; |
4691 if (HasState(ui::AX_STATE_VISITED)) | 4691 if (HasState(ui::AX_STATE_VISITED)) |
4692 ia_state |= STATE_SYSTEM_TRAVERSED; | 4692 ia_state |= STATE_SYSTEM_TRAVERSED; |
4693 | 4693 |
4694 // Expose whether or not the mouse is over an element, but suppress | 4694 // Expose whether or not the mouse is over an element, but suppress |
4695 // this for tests because it can make the test results flaky depending | 4695 // this for tests because it can make the test results flaky depending |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5199 return static_cast<BrowserAccessibilityWin*>(obj); | 5199 return static_cast<BrowserAccessibilityWin*>(obj); |
5200 } | 5200 } |
5201 | 5201 |
5202 const BrowserAccessibilityWin* | 5202 const BrowserAccessibilityWin* |
5203 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { | 5203 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { |
5204 DCHECK(!obj || obj->IsNative()); | 5204 DCHECK(!obj || obj->IsNative()); |
5205 return static_cast<const BrowserAccessibilityWin*>(obj); | 5205 return static_cast<const BrowserAccessibilityWin*>(obj); |
5206 } | 5206 } |
5207 | 5207 |
5208 } // namespace content | 5208 } // namespace content |
OLD | NEW |