| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // role is WebAXRoleStaticText. | 157 // role is WebAXRoleStaticText. |
| 158 gfx::Rect GetPageBoundsForRange(int start, int len) const; | 158 gfx::Rect GetPageBoundsForRange(int start, int len) const; |
| 159 | 159 |
| 160 // Same as |GetPageBoundsForRange| but in screen coordinates. | 160 // Same as |GetPageBoundsForRange| but in screen coordinates. |
| 161 gfx::Rect GetScreenBoundsForRange(int start, int len) const; | 161 gfx::Rect GetScreenBoundsForRange(int start, int len) const; |
| 162 | 162 |
| 163 // Convert a bounding rectangle from this node's coordinate system | 163 // Convert a bounding rectangle from this node's coordinate system |
| 164 // (which is relative to its nearest scrollable ancestor) to | 164 // (which is relative to its nearest scrollable ancestor) to |
| 165 // absolute bounds, either in page coordinates (when |frameOnly| is | 165 // absolute bounds, either in page coordinates (when |frameOnly| is |
| 166 // false), or in frame coordinates (when |frameOnly| is true). | 166 // false), or in frame coordinates (when |frameOnly| is true). |
| 167 gfx::Rect RelativeToAbsoluteBounds(gfx::RectF bounds, bool frame_only) const; | 167 virtual gfx::Rect RelativeToAbsoluteBounds(gfx::RectF bounds, |
| 168 bool frame_only) const; |
| 168 | 169 |
| 169 // This is to handle the cases such as ARIA textbox, where the value should | 170 // This is to handle the cases such as ARIA textbox, where the value should |
| 170 // be calculated from the object's inner text. | 171 // be calculated from the object's inner text. |
| 171 virtual base::string16 GetValue() const; | 172 virtual base::string16 GetValue() const; |
| 172 | 173 |
| 173 // Starting at the given character offset, locates the start of the next or | 174 // Starting at the given character offset, locates the start of the next or |
| 174 // previous line and returns its character offset. | 175 // previous line and returns its character offset. |
| 175 int GetLineStartBoundary(int start, | 176 int GetLineStartBoundary(int start, |
| 176 ui::TextBoundaryDirection direction, | 177 ui::TextBoundaryDirection direction, |
| 177 ui::AXTextAffinity affinity) const; | 178 ui::AXTextAffinity affinity) const; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 // bounds, but "virtual" elements in the accessibility tree that don't | 392 // bounds, but "virtual" elements in the accessibility tree that don't |
| 392 // correspond to a layed-out element sometimes don't have bounds. | 393 // correspond to a layed-out element sometimes don't have bounds. |
| 393 void FixEmptyBounds(gfx::RectF* bounds) const; | 394 void FixEmptyBounds(gfx::RectF* bounds) const; |
| 394 | 395 |
| 395 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 396 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
| 396 }; | 397 }; |
| 397 | 398 |
| 398 } // namespace content | 399 } // namespace content |
| 399 | 400 |
| 400 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 401 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
| OLD | NEW |