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