Chromium Code Reviews| Index: content/browser/accessibility/browser_accessibility.h |
| =================================================================== |
| --- content/browser/accessibility/browser_accessibility.h (revision 98225) |
| +++ content/browser/accessibility/browser_accessibility.h (working copy) |
| @@ -52,6 +52,12 @@ |
| // have been reset with new values from the renderer process. |
| virtual void Initialize(); |
| + // Optionally send events triggered simply by the fact that this node |
| + // has been created or modified (and has been attached to the tree). |
| + // This can include "show" events, "text changed" events in live regions, |
| + // or "alert" events. |
| + virtual void SendNodeUpdateEvents() {} |
| + |
| // Initialize this object, reading attributes from |src|. Does not |
| // recurse into children of |src| and build the whole subtree. |
| void Initialize(BrowserAccessibilityManager* manager, |
| @@ -139,6 +145,16 @@ |
| return int_attributes_; |
| } |
| + const std::map<WebAccessibility::FloatAttribute, float>& |
| + float_attributes() const { |
|
David Tseng
2011/08/26 16:14:37
Indent? (and below).
dmazzoni
2011/08/29 18:08:51
I think this may have been correct, but as a bette
|
| + return float_attributes_; |
| + } |
| + |
| + const std::map<WebAccessibility::BoolAttribute, bool>& |
| + bool_attributes() const { |
| + return bool_attributes_; |
| + } |
| + |
| int32 child_id() const { return child_id_; } |
| const std::vector<BrowserAccessibility*>& children() const { |
| return children_; |
| @@ -156,6 +172,9 @@ |
| const std::vector<int32>& cell_ids() const { |
| return cell_ids_; |
| } |
| + const std::vector<int32>& unique_cell_ids() const { |
| + return unique_cell_ids_; |
| + } |
| gfx::Rect location() const { return location_; } |
| BrowserAccessibilityManager* manager() const { return manager_; } |
| const string16& name() const { return name_; } |
| @@ -182,6 +201,21 @@ |
| // map and returns true if found. |
| bool GetIntAttribute(WebAccessibility::IntAttribute attribute, int* value); |
| + // Retrieve the value of a float attribute from the float attribute |
| + // map and returns true if found. |
| + bool GetFloatAttribute(WebAccessibility::FloatAttribute attr, float* value); |
| + |
| + // Retrieve the value of a bool attribute from the bool attribute |
| + // map and returns true if found. |
| + bool GetBoolAttribute(WebAccessibility::BoolAttribute attr, bool* value); |
| + |
| + // Retrieve the value of a html attribute from the attribute map and |
| + // returns true if found. |
| + bool GetHtmlAttribute(const char* attr, string16* value); |
| + |
| + // Returns true if this node is an editable text field of any kind. |
| + bool IsEditableText(); |
| + |
| protected: |
| BrowserAccessibility(); |
| @@ -212,6 +246,8 @@ |
| string16 value_; |
| std::map<WebAccessibility::StringAttribute, string16> string_attributes_; |
| std::map<WebAccessibility::IntAttribute, int32> int_attributes_; |
| + std::map<WebAccessibility::FloatAttribute, float> float_attributes_; |
| + std::map<WebAccessibility::BoolAttribute, bool> bool_attributes_; |
| std::vector<std::pair<string16, string16> > html_attributes_; |
| int32 role_; |
| int32 state_; |
| @@ -220,6 +256,7 @@ |
| std::vector<int32> indirect_child_ids_; |
| std::vector<int32> line_breaks_; |
| std::vector<int32> cell_ids_; |
| + std::vector<int32> unique_cell_ids_; |
| // BrowserAccessibility objects are reference-counted on some platforms. |
| // When we're done with this object and it's removed from our accessibility |