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_manager_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 // happens when the target has internal children inline text boxes. | 195 // happens when the target has internal children inline text boxes. |
196 if (win_event_type == EVENT_OBJECT_REORDER && | 196 if (win_event_type == EVENT_OBJECT_REORDER && |
197 target->PlatformChildCount() == 0) { | 197 target->PlatformChildCount() == 0) { |
198 return BrowserAccessibilityEvent::NotNeededOnThisPlatform; | 198 return BrowserAccessibilityEvent::NotNeededOnThisPlatform; |
199 } | 199 } |
200 | 200 |
201 // Pass the negation of this node's unique id in the |child_id| | 201 // Pass the negation of this node's unique id in the |child_id| |
202 // argument to NotifyWinEvent; the AT client will then call get_accChild | 202 // argument to NotifyWinEvent; the AT client will then call get_accChild |
203 // on the HWND's accessibility object and pass it that same id, which | 203 // on the HWND's accessibility object and pass it that same id, which |
204 // we can use to retrieve the IAccessible for this node. | 204 // we can use to retrieve the IAccessible for this node. |
205 LONG child_id = -target->unique_id(); | 205 LONG child_id = -(ToBrowserAccessibilityWin(target)->GetCOM()->unique_id()); |
206 ::NotifyWinEvent(win_event_type, hwnd, OBJID_CLIENT, child_id); | 206 ::NotifyWinEvent(win_event_type, hwnd, OBJID_CLIENT, child_id); |
207 return BrowserAccessibilityEvent::Sent; | 207 return BrowserAccessibilityEvent::Sent; |
208 } | 208 } |
209 | 209 |
210 bool BrowserAccessibilityManagerWin::CanFireEvents() { | 210 bool BrowserAccessibilityManagerWin::CanFireEvents() { |
211 BrowserAccessibilityDelegate* root_delegate = GetDelegateFromRootManager(); | 211 BrowserAccessibilityDelegate* root_delegate = GetDelegateFromRootManager(); |
212 if (!root_delegate) | 212 if (!root_delegate) |
213 return false; | 213 return false; |
214 HWND hwnd = root_delegate->AccessibilityGetAcceleratedWidget(); | 214 HWND hwnd = root_delegate->AccessibilityGetAcceleratedWidget(); |
215 return hwnd != nullptr; | 215 return hwnd != nullptr; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 DCHECK(changed_node); | 299 DCHECK(changed_node); |
300 BrowserAccessibility* obj = GetFromAXNode(changed_node); | 300 BrowserAccessibility* obj = GetFromAXNode(changed_node); |
301 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { | 301 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { |
302 ToBrowserAccessibilityWin(obj)->GetCOM()->UpdateStep3FireEvents( | 302 ToBrowserAccessibilityWin(obj)->GetCOM()->UpdateStep3FireEvents( |
303 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); | 303 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); |
304 } | 304 } |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 } // namespace content | 308 } // namespace content |
OLD | NEW |