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

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: Delete AXNodeData::Init() and clear bitfields in AXNodeData() instead. 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.id = 0; 60 empty_document.id = 0;
61 empty_document.role = ui::AX_ROLE_ROOT_WEB_AREA; 61 empty_document.role = ui::AX_ROLE_ROOT_WEB_AREA;
62 empty_document.state = 62 empty_document.AddState(ui::AX_STATE_READ_ONLY);
63 (1 << ui::AX_STATE_READ_ONLY) | (1 << ui::AX_STATE_BUSY); 63 empty_document.AddState(ui::AX_STATE_BUSY);
64 64
65 ui::AXTreeUpdate update; 65 ui::AXTreeUpdate update;
66 update.root_id = empty_document.id; 66 update.root_id = empty_document.id;
67 update.nodes.push_back(empty_document); 67 update.nodes.push_back(empty_document);
68 return update; 68 return update;
69 } 69 }
70 70
71 HWND BrowserAccessibilityManagerWin::GetParentHWND() { 71 HWND BrowserAccessibilityManagerWin::GetParentHWND() {
72 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager(); 72 BrowserAccessibilityDelegate* delegate = GetDelegateFromRootManager();
73 if (!delegate) 73 if (!delegate)
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)->UpdateStep3FireEvents( 302 ToBrowserAccessibilityWin(obj)->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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698