| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // its nearest scrollable ancestor) to local bounds (which are relative | 297 // its nearest scrollable ancestor) to local bounds (which are relative |
| 298 // to the top of the web accessibility tree). | 298 // to the top of the web accessibility tree). |
| 299 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; | 299 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; |
| 300 | 300 |
| 301 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 301 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
| 302 }; | 302 }; |
| 303 | 303 |
| 304 } // namespace content | 304 } // namespace content |
| 305 | 305 |
| 306 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 306 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
| OLD | NEW |