| OLD | NEW |
| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 // Retrieve the value of a string attribute from the attribute map and | 216 // Retrieve the value of a string attribute from the attribute map and |
| 217 // returns true if found. | 217 // returns true if found. |
| 218 bool GetStringAttribute(WebAccessibility::StringAttribute attribute, | 218 bool GetStringAttribute(WebAccessibility::StringAttribute attribute, |
| 219 string16* value) const; | 219 string16* value) const; |
| 220 | 220 |
| 221 // Retrieve the value of a html attribute from the attribute map and | 221 // Retrieve the value of a html attribute from the attribute map and |
| 222 // returns true if found. | 222 // returns true if found. |
| 223 bool GetHtmlAttribute(const char* attr, string16* value) const; | 223 bool GetHtmlAttribute(const char* attr, string16* value) const; |
| 224 | 224 |
| 225 // Returns true if the bit corresponding to the given state enum is 1. |
| 226 bool HasState(WebAccessibility::State state_enum) const; |
| 227 |
| 225 // Returns true if this node is an editable text field of any kind. | 228 // Returns true if this node is an editable text field of any kind. |
| 226 bool IsEditableText() const; | 229 bool IsEditableText() const; |
| 227 | 230 |
| 228 // Append the text from this node and its children. | 231 // Append the text from this node and its children. |
| 229 string16 GetTextRecursive() const; | 232 string16 GetTextRecursive() const; |
| 230 | 233 |
| 231 protected: | 234 protected: |
| 232 BrowserAccessibility(); | 235 BrowserAccessibility(); |
| 233 | 236 |
| 234 // The manager of this tree of accessibility objects; needed for | 237 // The manager of this tree of accessibility objects; needed for |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // tree, a client may still be holding onto a pointer to this object, so | 278 // tree, a client may still be holding onto a pointer to this object, so |
| 276 // we mark it as inactive so that calls to any of this object's methods | 279 // we mark it as inactive so that calls to any of this object's methods |
| 277 // immediately return failure. | 280 // immediately return failure. |
| 278 bool instance_active_; | 281 bool instance_active_; |
| 279 | 282 |
| 280 private: | 283 private: |
| 281 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 284 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 287 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
| OLD | NEW |