Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_win.cc

Issue 2852763002: Added a system caret used for accessibility on Windows. (Closed)
Patch Set: Fixed formatting. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
208 return BrowserAccessibilityEvent::Sent; 209 return BrowserAccessibilityEvent::Sent;
209 } 210 }
210 211
211 bool BrowserAccessibilityManagerWin::CanFireEvents() { 212 bool BrowserAccessibilityManagerWin::CanFireEvents() {
212 BrowserAccessibilityDelegate* root_delegate = GetDelegateFromRootManager(); 213 BrowserAccessibilityDelegate* root_delegate = GetDelegateFromRootManager();
213 if (!root_delegate) 214 if (!root_delegate)
214 return false; 215 return false;
215 HWND hwnd = root_delegate->AccessibilityGetAcceleratedWidget(); 216 HWND hwnd = root_delegate->AccessibilityGetAcceleratedWidget();
216 return hwnd != nullptr; 217 return hwnd != nullptr;
217 } 218 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 DCHECK(changed_node); 299 DCHECK(changed_node);
299 BrowserAccessibility* obj = GetFromAXNode(changed_node); 300 BrowserAccessibility* obj = GetFromAXNode(changed_node);
300 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { 301 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) {
301 ToBrowserAccessibilityWin(obj)->UpdateStep3FireEvents( 302 ToBrowserAccessibilityWin(obj)->UpdateStep3FireEvents(
302 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); 303 changes[i].type == AXTreeDelegate::SUBTREE_CREATED);
303 } 304 }
304 } 305 }
305 } 306 }
306 307
307 } // namespace content 308 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698