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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 private: | 266 private: |
267 // Return the sum of the lengths of all static text descendants, | 267 // Return the sum of the lengths of all static text descendants, |
268 // including this object if it's static text. | 268 // including this object if it's static text. |
269 int GetStaticTextLenRecursive() const; | 269 int GetStaticTextLenRecursive() const; |
270 | 270 |
271 // Similar to GetParent(), but includes nodes that are the host of a | 271 // Similar to GetParent(), but includes nodes that are the host of a |
272 // subtree rather than skipping over them - because they contain important | 272 // subtree rather than skipping over them - because they contain important |
273 // bounds offsets. | 273 // bounds offsets. |
274 BrowserAccessibility* GetParentForBoundsCalculation() const; | 274 BrowserAccessibility* GetParentForBoundsCalculation() const; |
275 | 275 |
| 276 // Convert the bounding rectangle of an element (which is relative to |
| 277 // its nearest scrollable ancestor) to local bounds (which are relative |
| 278 // to the top of the web accessibility tree). |
| 279 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; |
| 280 |
276 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 281 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
277 }; | 282 }; |
278 | 283 |
279 } // namespace content | 284 } // namespace content |
280 | 285 |
281 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 286 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
OLD | NEW |