OLD | NEW |
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
| 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(uint32 child_frame_id); |
| 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 uint32 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_ |
OLD | NEW |