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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.h

Issue 7966013: Rewrite renderer accessibility to not use WebAccessibilityCache. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 BrowserAccessibility* GetFocus(BrowserAccessibility* root); 119 BrowserAccessibility* GetFocus(BrowserAccessibility* root);
120 120
121 protected: 121 protected:
122 BrowserAccessibilityManager( 122 BrowserAccessibilityManager(
123 gfx::NativeView parent_view, 123 gfx::NativeView parent_view,
124 const WebAccessibility& src, 124 const WebAccessibility& src,
125 BrowserAccessibilityDelegate* delegate, 125 BrowserAccessibilityDelegate* delegate,
126 BrowserAccessibilityFactory* factory); 126 BrowserAccessibilityFactory* factory);
127 127
128 private: 128 private:
129 // Type is a ViewHostMsg_AccessibilityNotification_Type::int.
130 // We pass it as int so that we don't include the render message declaration
131 // header here.
132 void OnSimpleAccessibilityNotification(
133 const WebAccessibility& acc_obj,
134 int type,
135 bool include_children);
136
137 void OnAccessibilityObjectFocusChange(
138 const WebAccessibility& acc_obj);
139 void OnAccessibilityObjectLoadComplete(
140 const WebAccessibility& acc_obj);
141
142 // Update an accessibility node with an updated WebAccessibility node 129 // Update an accessibility node with an updated WebAccessibility node
143 // received from the renderer process. When |include_children| is true 130 // received from the renderer process. When |include_children| is true
144 // the node's children will also be updated, otherwise only the node 131 // the node's children will also be updated, otherwise only the node
145 // itself is updated. Returns the updated node or NULL if no node was 132 // itself is updated.
146 // updated. 133 void UpdateNode(const WebAccessibility& src, bool include_children);
147 BrowserAccessibility* UpdateNode(
148 const WebAccessibility& src,
149 bool include_children);
150 134
151 // Recursively build a tree of BrowserAccessibility objects from 135 // Recursively build a tree of BrowserAccessibility objects from
152 // the WebAccessibility tree received from the renderer process. 136 // the WebAccessibility tree received from the renderer process.
153 BrowserAccessibility* CreateAccessibilityTree( 137 BrowserAccessibility* CreateAccessibilityTree(
154 BrowserAccessibility* parent, 138 BrowserAccessibility* parent,
155 const WebAccessibility& src, 139 const WebAccessibility& src,
156 int index_in_parent, 140 int index_in_parent,
157 bool send_show_events); 141 bool send_show_events);
158 142
159 protected: 143 protected:
(...skipping 18 matching lines...) Expand all
178 // we use internally here. 162 // we use internally here.
179 base::hash_map<int32, int32> renderer_id_to_child_id_map_; 163 base::hash_map<int32, int32> renderer_id_to_child_id_map_;
180 164
181 // A mapping from child IDs to BrowserAccessibility objects. 165 // A mapping from child IDs to BrowserAccessibility objects.
182 base::hash_map<int32, BrowserAccessibility*> child_id_map_; 166 base::hash_map<int32, BrowserAccessibility*> child_id_map_;
183 167
184 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); 168 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
185 }; 169 };
186 170
187 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 171 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698