Index: content/browser/accessibility/browser_accessibility.h |
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h |
index d1df6b96a9448c4a1b835bc313ba8753aec83fbb..1e4c72ba09cee758193d23e1e4a5c24b5074a776 100644 |
--- a/content/browser/accessibility/browser_accessibility.h |
+++ b/content/browser/accessibility/browser_accessibility.h |
@@ -66,7 +66,7 @@ class CONTENT_EXPORT BrowserAccessibility { |
void InitializeTreeStructure( |
BrowserAccessibilityManager* manager, |
BrowserAccessibility* parent, |
- int32 renderer_id, |
aboxhall
2014/04/04 22:18:10
I assume this is mostly for clarification? It was
dmazzoni
2014/04/04 23:27:39
Yeah, this is to match AXNode. The "other" ID has
|
+ int32 id, |
int32 index_in_parent); |
// Initialize this object's data. |
@@ -83,12 +83,6 @@ class CONTENT_EXPORT BrowserAccessibility { |
// Return true if this object is equal to or a descendant of |ancestor|. |
bool IsDescendantOf(BrowserAccessibility* ancestor); |
- // Returns the parent of this object, or NULL if it's the root. |
- BrowserAccessibility* parent() const { return parent_; } |
- |
- // Returns the number of children of this object. |
- uint32 child_count() const { return children_.size(); } |
- |
// Returns true if this is a leaf node on this platform, meaning any |
// children should not be exposed to this platform's native accessibility |
// layer. Each platform subclass should implement this itself. |
@@ -154,26 +148,33 @@ class CONTENT_EXPORT BrowserAccessibility { |
// Accessors |
// |
- const std::vector<BrowserAccessibility*>& children() const { |
- return children_; |
- } |
- const std::vector<std::pair<std::string, std::string> >& |
- html_attributes() const { |
- return html_attributes_; |
- } |
- int32 index_in_parent() const { return index_in_parent_; } |
- gfx::Rect location() const { return location_; } |
BrowserAccessibilityManager* manager() const { return manager_; } |
+ bool instance_active() const { return instance_active_; } |
const std::string& name() const { return name_; } |
const std::string& value() const { return value_; } |
- int32 renderer_id() const { return renderer_id_; } |
- int32 role() const { return role_; } |
- int32 state() const { return state_; } |
- bool instance_active() const { return instance_active_; } |
- |
void set_name(const std::string& name) { name_ = name; } |
void set_value(const std::string& value) { value_ = value; } |
+ std::vector<BrowserAccessibility*>& deprecated_children() { |
+ return deprecated_children_; |
+ } |
+ |
+ BrowserAccessibility* GetParent() const { return deprecated_parent_; } |
aboxhall
2014/04/04 22:18:10
How will the traversing logic work after the switc
dmazzoni
2014/04/04 23:27:39
Afterwards, each BrowserAccessibility will have a
|
+ int32 GetIndexInParent() const { return deprecated_index_in_parent_; } |
+ uint32 InternalChildCount() const { return deprecated_children_.size(); } |
aboxhall
2014/04/04 22:18:10
Why are this and the below method named 'Internal*
dmazzoni
2014/04/04 23:27:39
To contrast with PlatformChildCount and PlatformGe
|
+ BrowserAccessibility* InternalGetChild(uint32 child_index) const { |
+ return deprecated_children_[child_index]; |
+ } |
+ |
+ int32 GetId() const { return data_.id; } |
+ gfx::Rect GetLocation() const { return data_.location; } |
+ int32 GetRole() const { return data_.role; } |
+ int32 GetState() const { return data_.state; } |
+ const std::vector<std::pair<std::string, std::string> >& GetHtmlAttributes() |
+ const { |
+ return data_.html_attributes; |
+ } |
+ |
#if defined(OS_MACOSX) && __OBJC__ |
BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); |
#elif defined(OS_WIN) |
@@ -273,7 +274,7 @@ class CONTENT_EXPORT BrowserAccessibility { |
BrowserAccessibilityManager* manager_; |
// The parent of this object, may be NULL if we're the root object. |
- BrowserAccessibility* parent_; |
+ BrowserAccessibility* deprecated_parent_; |
private: |
// Return the sum of the lengths of all static text descendants, |
@@ -281,32 +282,15 @@ class CONTENT_EXPORT BrowserAccessibility { |
int GetStaticTextLenRecursive() const; |
// The index of this within its parent object. |
- int32 index_in_parent_; |
- |
- // The ID of this object in the renderer process. |
- int32 renderer_id_; |
+ int32 deprecated_index_in_parent_; |
// The children of this object. |
- std::vector<BrowserAccessibility*> children_; |
+ std::vector<BrowserAccessibility*> deprecated_children_; |
// Accessibility metadata from the renderer |
std::string name_; |
std::string value_; |
- std::vector<std::pair< |
- ui::AXBoolAttribute, bool> > bool_attributes_; |
- std::vector<std::pair< |
- ui::AXFloatAttribute, float> > float_attributes_; |
- std::vector<std::pair< |
- ui::AXIntAttribute, int> > int_attributes_; |
- std::vector<std::pair< |
- ui::AXStringAttribute, std::string> > string_attributes_; |
- std::vector<std::pair< |
- ui::AXIntListAttribute, std::vector<int32> > > |
- intlist_attributes_; |
- std::vector<std::pair<std::string, std::string> > html_attributes_; |
- int32 role_; |
- int32 state_; |
- gfx::Rect location_; |
+ ui::AXNodeData data_; |
// BrowserAccessibility objects are reference-counted on some platforms. |
// When we're done with this object and it's removed from our accessibility |