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

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

Issue 268543008: Cross-process iframe accessibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rewritten based on RFHI instead of RVHI Created 6 years, 4 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) 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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 namespace content { 24 namespace content {
25 class BrowserAccessibilityManager; 25 class BrowserAccessibilityManager;
26 #if defined(OS_WIN) 26 #if defined(OS_WIN)
27 class BrowserAccessibilityWin; 27 class BrowserAccessibilityWin;
28 #endif 28 #endif
29 29
30 //////////////////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////////////////
31 // 31 //
32 // BrowserAccessibility 32 // BrowserAccessibility
33 // 33 //
34 // Class implementing the cross platform interface for the Browser-Renderer 34 // Class implementing the cross platform interface for the Browser-Renderer
Charlie Reis 2014/08/20 20:37:13 Do we have a separate instance of this class for e
dmazzoni 2014/08/20 20:57:17 Sorry, I haven't updated that comment in years. Th
dmazzoni 2014/08/25 06:49:36 Comment updated a bit.
35 // communication of accessibility information, providing accessibility 35 // communication of accessibility information, providing accessibility
36 // to be used by screen readers and other assistive technology (AT). 36 // to be used by screen readers and other assistive technology (AT).
37 // 37 //
38 // An implementation for each platform handles platform specific accessibility 38 // An implementation for each platform handles platform specific accessibility
39 // APIs. 39 // APIs.
40 // 40 //
41 //////////////////////////////////////////////////////////////////////////////// 41 ////////////////////////////////////////////////////////////////////////////////
42 class CONTENT_EXPORT BrowserAccessibility { 42 class CONTENT_EXPORT BrowserAccessibility {
43 public: 43 public:
44 // Creates a platform specific BrowserAccessibility. Ownership passes to the 44 // Creates a platform specific BrowserAccessibility. Ownership passes to the
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 // Returns true if the bit corresponding to the given state enum is 1. 239 // Returns true if the bit corresponding to the given state enum is 1.
240 bool HasState(ui::AXState state_enum) const; 240 bool HasState(ui::AXState state_enum) const;
241 241
242 // Returns true if this node is an editable text field of any kind. 242 // Returns true if this node is an editable text field of any kind.
243 bool IsEditableText() const; 243 bool IsEditableText() const;
244 244
245 // Append the text from this node and its children. 245 // Append the text from this node and its children.
246 std::string GetTextRecursive() const; 246 std::string GetTextRecursive() const;
247 247
248 // Identifies the given frame id as the only child of this node, so
Charlie Reis 2014/08/20 20:37:13 I don't follow why this would track a single child
dmazzoni 2014/08/20 20:57:17 This object would correspond to an actual <iframe>
249 // any call to PlatformChildCount/PlatformGetChild will use
250 // FrameTreeAccessibility to retrieve the BrowserAccessibilityManager
251 // of the child frame and return its root node as this node's child.
252 void SetChildFrameId(int64 child_frame_id);
Charlie Reis 2014/08/20 20:37:13 nit: FrameId is ambiguous, between a RenderFrame r
dmazzoni 2014/08/20 20:57:17 Agreed, let me clarify.
dmazzoni 2014/08/25 06:49:36 Done.
253
248 protected: 254 protected:
249 BrowserAccessibility(); 255 BrowserAccessibility();
250 256
251 // The manager of this tree of accessibility objects. 257 // The manager of this tree of accessibility objects.
252 BrowserAccessibilityManager* manager_; 258 BrowserAccessibilityManager* manager_;
253 259
254 // The underlying node. 260 // The underlying node.
255 ui::AXNode* node_; 261 ui::AXNode* node_;
256 262
257 private: 263 private:
258 // Return the sum of the lengths of all static text descendants, 264 // Return the sum of the lengths of all static text descendants,
259 // including this object if it's static text. 265 // including this object if it's static text.
260 int GetStaticTextLenRecursive() const; 266 int GetStaticTextLenRecursive() const;
261 267
262 std::string name_; 268 std::string name_;
263 std::string value_; 269 std::string value_;
264 270
265 private: 271 int64 child_frame_id_;
272
266 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 273 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
267 }; 274 };
268 275
269 } // namespace content 276 } // namespace content
270 277
271 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 278 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698