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

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

Issue 2860883003: A11y: Add/refactor methods for manipulating bitfields on AXNodeData. (Closed)
Patch Set: Revert comment. 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // destructor, otherwise our overrides of functions like 50 // destructor, otherwise our overrides of functions like
51 // OnNodeWillBeDeleted won't be called. 51 // OnNodeWillBeDeleted won't be called.
52 tree_.reset(NULL); 52 tree_.reset(NULL);
53 ui::GetIAccessible2UsageObserverList().RemoveObserver(this); 53 ui::GetIAccessible2UsageObserverList().RemoveObserver(this);
54 } 54 }
55 55
56 // static 56 // static
57 ui::AXTreeUpdate 57 ui::AXTreeUpdate
58 BrowserAccessibilityManagerWin::GetEmptyDocument() { 58 BrowserAccessibilityManagerWin::GetEmptyDocument() {
59 ui::AXNodeData empty_document; 59 ui::AXNodeData empty_document;
60 empty_document.ClearBitfields();
60 empty_document.id = 0; 61 empty_document.id = 0;
61 empty_document.role = ui::AX_ROLE_ROOT_WEB_AREA; 62 empty_document.role = ui::AX_ROLE_ROOT_WEB_AREA;
62 empty_document.state = 63 empty_document.AddState(ui::AX_STATE_READ_ONLY);
63 (1 << ui::AX_STATE_READ_ONLY) | (1 << ui::AX_STATE_BUSY); 64 empty_document.AddState(ui::AX_STATE_BUSY);
64 65
65 ui::AXTreeUpdate update; 66 ui::AXTreeUpdate update;
66 update.root_id = empty_document.id; 67 update.root_id = empty_document.id;
67 update.nodes.push_back(empty_document); 68 update.nodes.push_back(empty_document);
68 return update; 69 return update;
69 } 70 }
70 71
71 HWND BrowserAccessibilityManagerWin::GetParentHWND() { 72 HWND BrowserAccessibilityManagerWin::GetParentHWND() {
72 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager(); 73 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager();
73 if (!delegate) 74 if (!delegate)
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 DCHECK(changed_node); 300 DCHECK(changed_node);
300 BrowserAccessibility* obj = GetFromAXNode(changed_node); 301 BrowserAccessibility* obj = GetFromAXNode(changed_node);
301 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) { 302 if (obj && obj->IsNative() && !obj->PlatformIsChildOfLeaf()) {
302 ToBrowserAccessibilityWin(obj)->UpdateStep3FireEvents( 303 ToBrowserAccessibilityWin(obj)->UpdateStep3FireEvents(
303 changes[i].type == AXTreeDelegate::SUBTREE_CREATED); 304 changes[i].type == AXTreeDelegate::SUBTREE_CREATED);
304 } 305 }
305 } 306 }
306 } 307 }
307 308
308 } // namespace content 309 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698