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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Called after the object is first initialized and again every time | 58 // Called after the object is first initialized and again every time |
59 // its data changes. | 59 // its data changes. |
60 virtual void OnDataChanged() {} | 60 virtual void OnDataChanged() {} |
61 | 61 |
62 virtual void OnSubtreeWillBeDeleted() {} | 62 virtual void OnSubtreeWillBeDeleted() {} |
63 | 63 |
64 // Called when the location changed. | 64 // Called when the location changed. |
65 virtual void OnLocationChanged() {} | 65 virtual void OnLocationChanged() {} |
66 | 66 |
67 // Return true if this object is equal to or a descendant of |ancestor|. | 67 // Return true if this object is equal to or a descendant of |ancestor|. |
68 bool IsDescendantOf(BrowserAccessibility* ancestor); | 68 bool IsDescendantOf(const BrowserAccessibility* ancestor) const; |
69 | 69 |
70 // Returns true if this is a leaf node on this platform, meaning any | 70 // Returns true if this is a leaf node on this platform, meaning any |
71 // children should not be exposed to this platform's native accessibility | 71 // children should not be exposed to this platform's native accessibility |
72 // layer. Each platform subclass should implement this itself. | 72 // layer. Each platform subclass should implement this itself. |
73 // The definition of a leaf may vary depending on the platform, | 73 // The definition of a leaf may vary depending on the platform, |
74 // but a leaf node should never have children that are focusable or | 74 // but a leaf node should never have children that are focusable or |
75 // that might send notifications. | 75 // that might send notifications. |
76 virtual bool PlatformIsLeaf() const; | 76 virtual bool PlatformIsLeaf() const; |
77 | 77 |
78 // Returns the number of children of this object, or 0 if PlatformIsLeaf() | 78 // Returns the number of children of this object, or 0 if PlatformIsLeaf() |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 // its nearest scrollable ancestor) to local bounds (which are relative | 293 // its nearest scrollable ancestor) to local bounds (which are relative |
294 // to the top of the web accessibility tree). | 294 // to the top of the web accessibility tree). |
295 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; | 295 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; |
296 | 296 |
297 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 297 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
298 }; | 298 }; |
299 | 299 |
300 } // namespace content | 300 } // namespace content |
301 | 301 |
302 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 302 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
OLD | NEW |