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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 // Returns true if the bit corresponding to the given state enum is 1. | 240 // Returns true if the bit corresponding to the given state enum is 1. |
241 bool HasState(ui::AXState state_enum) const; | 241 bool HasState(ui::AXState state_enum) const; |
242 | 242 |
243 // Returns true if this node is an editable text field of any kind. | 243 // Returns true if this node is an editable text field of any kind. |
244 bool IsEditableText() const; | 244 bool IsEditableText() const; |
245 | 245 |
246 // Append the text from this node and its children. | 246 // Append the text from this node and its children. |
247 std::string GetTextRecursive() const; | 247 std::string GetTextRecursive() const; |
248 | 248 |
249 // Identifies the given frame tree node id as the only child of this node, | |
250 // so any call to PlatformChildCount/PlatformGetChild will use | |
251 // BrowserAccessibilityDelegate::AccessibilityGetChildFrame to retrieve | |
252 // the BrowserAccessibilityManager of the child frame and return its root | |
253 // node as this node's child. | |
254 void SetChildFrameTreeNodeId(int64 child_frame_tree_node_id); | |
255 | |
256 int64 child_frame_tree_node_id() const { return child_frame_tree_node_id_; } | |
257 | |
258 protected: | 249 protected: |
259 BrowserAccessibility(); | 250 BrowserAccessibility(); |
260 | 251 |
261 // The manager of this tree of accessibility objects. | 252 // The manager of this tree of accessibility objects. |
262 BrowserAccessibilityManager* manager_; | 253 BrowserAccessibilityManager* manager_; |
263 | 254 |
264 // The underlying node. | 255 // The underlying node. |
265 ui::AXNode* node_; | 256 ui::AXNode* node_; |
266 | 257 |
267 private: | 258 private: |
268 // Return the sum of the lengths of all static text descendants, | 259 // Return the sum of the lengths of all static text descendants, |
269 // including this object if it's static text. | 260 // including this object if it's static text. |
270 int GetStaticTextLenRecursive() const; | 261 int GetStaticTextLenRecursive() const; |
271 | 262 |
272 std::string name_; | 263 std::string name_; |
273 std::string value_; | 264 std::string value_; |
274 | 265 |
275 // If nonzero, the frame tree node id of the child frame of this node. | |
276 int64 child_frame_tree_node_id_; | |
277 | |
278 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 266 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
279 }; | 267 }; |
280 | 268 |
281 } // namespace content | 269 } // namespace content |
282 | 270 |
283 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 271 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
OLD | NEW |