Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: content/browser/accessibility/browser_accessibility.h

Issue 15741009: Native Android accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Update the parent and index in parent if this node has been moved. 81 // Update the parent and index in parent if this node has been moved.
82 void UpdateParent(BrowserAccessibility* parent, int index_in_parent); 82 void UpdateParent(BrowserAccessibility* parent, int index_in_parent);
83 83
84 // Update this node's location, leaving everything else the same. 84 // Update this node's location, leaving everything else the same.
85 virtual void SetLocation(const gfx::Rect& new_location); 85 virtual void SetLocation(const gfx::Rect& new_location);
86 86
87 // Return true if this object is equal to or a descendant of |ancestor|. 87 // Return true if this object is equal to or a descendant of |ancestor|.
88 bool IsDescendantOf(BrowserAccessibility* ancestor); 88 bool IsDescendantOf(BrowserAccessibility* ancestor);
89 89
90 // Returns the parent of this object, or NULL if it's the root. 90 // Returns the parent of this object, or NULL if it's the root.
91 BrowserAccessibility* parent() { return parent_; } 91 BrowserAccessibility* parent() const { return parent_; }
92 92
93 // Returns the number of children of this object. 93 // Returns the number of children of this object.
94 uint32 child_count() const { return children_.size(); } 94 uint32 child_count() const { return children_.size(); }
95 95
96 // Return a pointer to the child with the given index. 96 // Return a pointer to the child with the given index.
97 BrowserAccessibility* GetChild(uint32 child_index); 97 BrowserAccessibility* GetChild(uint32 child_index) const;
98 98
99 // Return the previous sibling of this object, or NULL if it's the first 99 // Return the previous sibling of this object, or NULL if it's the first
100 // child of its parent. 100 // child of its parent.
101 BrowserAccessibility* GetPreviousSibling(); 101 BrowserAccessibility* GetPreviousSibling();
102 102
103 // Return the next sibling of this object, or NULL if it's the last child 103 // Return the next sibling of this object, or NULL if it's the last child
104 // of its parent. 104 // of its parent.
105 BrowserAccessibility* GetNextSibling(); 105 BrowserAccessibility* GetNextSibling();
106 106
107 // Returns the bounds of this object in coordinates relative to the 107 // Returns the bounds of this object in coordinates relative to the
108 // top-left corner of the overall web area. 108 // top-left corner of the overall web area.
109 gfx::Rect GetLocalBoundsRect(); 109 gfx::Rect GetLocalBoundsRect() const;
110 110
111 // Returns the bounds of this object in screen coordinates. 111 // Returns the bounds of this object in screen coordinates.
112 gfx::Rect GetGlobalBoundsRect(); 112 gfx::Rect GetGlobalBoundsRect() const;
113 113
114 // Returns the deepest descendant that contains the specified point 114 // Returns the deepest descendant that contains the specified point
115 // (in global screen coordinates). 115 // (in global screen coordinates).
116 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point); 116 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point);
117 117
118 // Marks this object for deletion, releases our reference to it, and 118 // Marks this object for deletion, releases our reference to it, and
119 // recursively calls Destroy() on its children. May not delete 119 // recursively calls Destroy() on its children. May not delete
120 // immediately due to reference counting. 120 // immediately due to reference counting.
121 // 121 //
122 // Reference counting is used on some platforms because the 122 // Reference counting is used on some platforms because the
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // immediately return failure. 287 // immediately return failure.
288 bool instance_active_; 288 bool instance_active_;
289 289
290 private: 290 private:
291 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 291 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
292 }; 292 };
293 293
294 } // namespace content 294 } // namespace content
295 295
296 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 296 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698