| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // top-left corner of the overall web area. Only valid when the | 107 // top-left corner of the overall web area. Only valid when the |
| 108 // role is WebAXRoleStaticText. | 108 // role is WebAXRoleStaticText. |
| 109 gfx::Rect GetLocalBoundsForRange(int start, int len) const; | 109 gfx::Rect GetLocalBoundsForRange(int start, int len) const; |
| 110 | 110 |
| 111 // Same as GetLocalBoundsForRange, in screen coordinates. Only valid when | 111 // Same as GetLocalBoundsForRange, in screen coordinates. Only valid when |
| 112 // the role is WebAXRoleStaticText. | 112 // the role is WebAXRoleStaticText. |
| 113 gfx::Rect GetGlobalBoundsForRange(int start, int len) const; | 113 gfx::Rect GetGlobalBoundsForRange(int start, int len) const; |
| 114 | 114 |
| 115 // Searches in the given text and from the given offset until the start of | 115 // Searches in the given text and from the given offset until the start of |
| 116 // the next or previous word is found and returns its position. | 116 // the next or previous word is found and returns its position. |
| 117 // In case there is no word boundary before or after the given offset, it |
| 118 // returns one past the last character, i.e. the text's length. |
| 119 // If the given offset is already at the start of a word, returns the start |
| 120 // of the next word if the search is forwards and the given offset if it is |
| 121 // backwards. |
| 122 // If the start offset is equal to -1 and the search is in the forwards |
| 123 // direction, returns the start boundary of the first word. |
| 124 // Start offsets that are not in the range -1 to text length are invalid. |
| 117 int GetWordStartBoundary( | 125 int GetWordStartBoundary( |
| 118 int start, ui::TextBoundaryDirection direction) const; | 126 int start, ui::TextBoundaryDirection direction) const; |
| 119 | 127 |
| 120 // Returns the deepest descendant that contains the specified point | 128 // Returns the deepest descendant that contains the specified point |
| 121 // (in global screen coordinates). | 129 // (in global screen coordinates). |
| 122 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point); | 130 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point); |
| 123 | 131 |
| 124 // Marks this object for deletion, releases our reference to it, and | 132 // Marks this object for deletion, releases our reference to it, and |
| 125 // nulls out the pointer to the underlying AXNode. May not delete | 133 // nulls out the pointer to the underlying AXNode. May not delete |
| 126 // the object immediately due to reference counting. | 134 // the object immediately due to reference counting. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // its nearest scrollable ancestor) to local bounds (which are relative | 285 // its nearest scrollable ancestor) to local bounds (which are relative |
| 278 // to the top of the web accessibility tree). | 286 // to the top of the web accessibility tree). |
| 279 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; | 287 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; |
| 280 | 288 |
| 281 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 289 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
| 282 }; | 290 }; |
| 283 | 291 |
| 284 } // namespace content | 292 } // namespace content |
| 285 | 293 |
| 286 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 294 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
| OLD | NEW |