| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 target->PlatformChildCount() == 0) { | 198 target->PlatformChildCount() == 0) { |
| 199 return BrowserAccessibilityEvent::NotNeededOnThisPlatform; | 199 return BrowserAccessibilityEvent::NotNeededOnThisPlatform; |
| 200 } | 200 } |
| 201 | 201 |
| 202 // Pass the negation of this node's unique id in the |child_id| | 202 // Pass the negation of this node's unique id in the |child_id| |
| 203 // argument to NotifyWinEvent; the AT client will then call get_accChild | 203 // argument to NotifyWinEvent; the AT client will then call get_accChild |
| 204 // on the HWND's accessibility object and pass it that same id, which | 204 // on the HWND's accessibility object and pass it that same id, which |
| 205 // we can use to retrieve the IAccessible for this node. | 205 // we can use to retrieve the IAccessible for this node. |
| 206 LONG child_id = -target->unique_id(); | 206 LONG child_id = -target->unique_id(); |
| 207 ::NotifyWinEvent(win_event_type, hwnd, OBJID_CLIENT, child_id); | 207 ::NotifyWinEvent(win_event_type, hwnd, OBJID_CLIENT, child_id); |
| 208 | |
| 209 return BrowserAccessibilityEvent::Sent; | 208 return BrowserAccessibilityEvent::Sent; |
| 210 } | 209 } |
| 211 | 210 |
| 212 bool BrowserAccessibilityManagerWin::CanFireEvents() { | 211 bool BrowserAccessibilityManagerWin::CanFireEvents() { |
| 213 BrowserAccessibilityDelegate* root_delegate = GetDelegateFromRootManager(); | 212 BrowserAccessibilityDelegate* root_delegate = GetDelegateFromRootManager(); |
| 214 if (!root_delegate) | 213 if (!root_delegate) |
| 215 return false; | 214 return false; |
| 216 HWND hwnd = root_delegate->AccessibilityGetAcceleratedWidget(); | 215 HWND hwnd = root_delegate->AccessibilityGetAcceleratedWidget(); |
| 217 return hwnd != nullptr; | 216 return hwnd != nullptr; |
| 218 } | 217 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 DCHECK(changed_node); | 300 DCHECK(changed_node); |
| 302 BrowserAccessibility* obj = GetFromAXNode(changed_node); | 301 BrowserAccessibility* obj = GetFromAXNode(changed_node); |
| 303 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { | 302 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { |
| 304 ToBrowserAccessibilityWin(obj)->GetCOM()->UpdateStep3FireEvents( | 303 ToBrowserAccessibilityWin(obj)->GetCOM()->UpdateStep3FireEvents( |
| 305 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); | 304 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); |
| 306 } | 305 } |
| 307 } | 306 } |
| 308 } | 307 } |
| 309 | 308 |
| 310 } // namespace content | 309 } // namespace content |
| OLD | NEW |