OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_manager_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
6 | 6 |
7 #include "content/browser/accessibility/browser_accessibility_win.h" | 7 #include "content/browser/accessibility/browser_accessibility_win.h" |
8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
9 | 9 |
10 using webkit_glue::WebAccessibility; | 10 using webkit_glue::WebAccessibility; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 IAccessible* BrowserAccessibilityManagerWin::GetParentWindowIAccessible() { | 51 IAccessible* BrowserAccessibilityManagerWin::GetParentWindowIAccessible() { |
52 return window_iaccessible_; | 52 return window_iaccessible_; |
53 } | 53 } |
54 | 54 |
55 void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent( | 55 void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent( |
56 int type, | 56 int type, |
57 BrowserAccessibility* node) { | 57 BrowserAccessibility* node) { |
58 LONG event_id = EVENT_MIN; | 58 LONG event_id = EVENT_MIN; |
59 switch (type) { | 59 switch (type) { |
60 case ViewHostMsg_AccessibilityNotification_Type:: | 60 case ViewHostMsg_AccEvent::ACTIVE_DESCENDANT_CHANGED: |
61 NOTIFICATION_TYPE_CHECK_STATE_CHANGED: | 61 event_id = IA2_EVENT_ACTIVE_DESCENDANT_CHANGED; |
| 62 break; |
| 63 case ViewHostMsg_AccEvent::CHECK_STATE_CHANGED: |
62 event_id = EVENT_OBJECT_STATECHANGE; | 64 event_id = EVENT_OBJECT_STATECHANGE; |
63 break; | 65 break; |
64 case ViewHostMsg_AccessibilityNotification_Type:: | 66 case ViewHostMsg_AccEvent::CHILDREN_CHANGED: |
65 NOTIFICATION_TYPE_CHILDREN_CHANGED: | |
66 event_id = EVENT_OBJECT_REORDER; | 67 event_id = EVENT_OBJECT_REORDER; |
67 break; | 68 break; |
68 case ViewHostMsg_AccessibilityNotification_Type:: | 69 case ViewHostMsg_AccEvent::FOCUS_CHANGED: |
69 NOTIFICATION_TYPE_FOCUS_CHANGED: | |
70 event_id = EVENT_OBJECT_FOCUS; | 70 event_id = EVENT_OBJECT_FOCUS; |
71 break; | 71 break; |
72 case ViewHostMsg_AccessibilityNotification_Type:: | 72 case ViewHostMsg_AccEvent::LOAD_COMPLETE: |
73 NOTIFICATION_TYPE_LOAD_COMPLETE: | |
74 event_id = IA2_EVENT_DOCUMENT_LOAD_COMPLETE; | 73 event_id = IA2_EVENT_DOCUMENT_LOAD_COMPLETE; |
75 break; | 74 break; |
76 case ViewHostMsg_AccessibilityNotification_Type:: | 75 case ViewHostMsg_AccEvent::VALUE_CHANGED: |
77 NOTIFICATION_TYPE_VALUE_CHANGED: | |
78 event_id = EVENT_OBJECT_VALUECHANGE; | 76 event_id = EVENT_OBJECT_VALUECHANGE; |
79 break; | 77 break; |
80 case ViewHostMsg_AccessibilityNotification_Type:: | 78 case ViewHostMsg_AccEvent::SELECTED_TEXT_CHANGED: |
81 NOTIFICATION_TYPE_SELECTED_TEXT_CHANGED: | |
82 event_id = IA2_EVENT_TEXT_CARET_MOVED; | 79 event_id = IA2_EVENT_TEXT_CARET_MOVED; |
83 break; | 80 break; |
| 81 case ViewHostMsg_AccEvent::LIVE_REGION_CHANGED: |
| 82 event_id = EVENT_OBJECT_REORDER; |
| 83 break; |
| 84 case ViewHostMsg_AccEvent::TEXT_INSERTED: |
| 85 event_id = IA2_EVENT_TEXT_INSERTED; |
| 86 break; |
| 87 case ViewHostMsg_AccEvent::TEXT_REMOVED: |
| 88 event_id = IA2_EVENT_TEXT_REMOVED; |
| 89 break; |
| 90 case ViewHostMsg_AccEvent::OBJECT_SHOW: |
| 91 event_id = EVENT_OBJECT_SHOW; |
| 92 break; |
| 93 case ViewHostMsg_AccEvent::OBJECT_HIDE: |
| 94 event_id = EVENT_OBJECT_HIDE; |
| 95 break; |
| 96 case ViewHostMsg_AccEvent::ALERT: |
| 97 event_id = EVENT_SYSTEM_ALERT; |
| 98 break; |
84 default: | 99 default: |
85 NOTREACHED(); | 100 // Not all WebKit accessibility events result in a Windows |
86 break; | 101 // accessibility notification. |
| 102 return; |
87 } | 103 } |
88 | 104 |
89 NotifyWinEvent(event_id, GetParentView(), OBJID_CLIENT, node->child_id()); | 105 NotifyWinEvent(event_id, GetParentView(), OBJID_CLIENT, node->child_id()); |
90 } | 106 } |
OLD | NEW |