| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // returns one past the last character. | 178 // returns one past the last character. |
| 179 // If the given offset is already at the start of a word, returns the start | 179 // If the given offset is already at the start of a word, returns the start |
| 180 // of the next word if the search is forwards, and the given offset if it is | 180 // of the next word if the search is forwards, and the given offset if it is |
| 181 // backwards. | 181 // backwards. |
| 182 // If the start offset is equal to -1 and the search is in the forwards | 182 // If the start offset is equal to -1 and the search is in the forwards |
| 183 // direction, returns the start boundary of the first word. | 183 // direction, returns the start boundary of the first word. |
| 184 // Start offsets that are not in the range -1 to text length are invalid. | 184 // Start offsets that are not in the range -1 to text length are invalid. |
| 185 int GetWordStartBoundary(int start, | 185 int GetWordStartBoundary(int start, |
| 186 ui::TextBoundaryDirection direction) const; | 186 ui::TextBoundaryDirection direction) const; |
| 187 | 187 |
| 188 // Returns the deepest descendant that contains the specified point | 188 // This is an approximate hit test that only uses the information in |
| 189 // (in global screen coordinates). | 189 // the browser process to compute the correct result. It will not return |
| 190 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point); | 190 // correct results in many cases of z-index, overflow, and absolute |
| 191 // positioning, so BrowserAccessibilityManager::CachingAsyncHitTest |
| 192 // should be used instead, which falls back on calling ApproximateHitTest |
| 193 // automatically. |
| 194 BrowserAccessibility* ApproximateHitTest(const gfx::Point& screen_point); |
| 191 | 195 |
| 192 // Marks this object for deletion, releases our reference to it, and | 196 // Marks this object for deletion, releases our reference to it, and |
| 193 // nulls out the pointer to the underlying AXNode. May not delete | 197 // nulls out the pointer to the underlying AXNode. May not delete |
| 194 // the object immediately due to reference counting. | 198 // the object immediately due to reference counting. |
| 195 // | 199 // |
| 196 // Reference counting is used on some platforms because the | 200 // Reference counting is used on some platforms because the |
| 197 // operating system may hold onto a reference to a BrowserAccessibility | 201 // operating system may hold onto a reference to a BrowserAccessibility |
| 198 // object even after we're through with it. When a BrowserAccessibility | 202 // object even after we're through with it. When a BrowserAccessibility |
| 199 // has had Destroy() called but its reference count is not yet zero, | 203 // has had Destroy() called but its reference count is not yet zero, |
| 200 // instance_active() returns false and queries on this object return failure. | 204 // instance_active() returns false and queries on this object return failure. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 // page coordinates (when |frameOnly| is false), or in frame coordinates | 381 // page coordinates (when |frameOnly| is false), or in frame coordinates |
| 378 // (when |frameOnly| is true). | 382 // (when |frameOnly| is true). |
| 379 gfx::Rect RelativeToAbsoluteBounds(gfx::RectF bounds, bool frame_only) const; | 383 gfx::Rect RelativeToAbsoluteBounds(gfx::RectF bounds, bool frame_only) const; |
| 380 | 384 |
| 381 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 385 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
| 382 }; | 386 }; |
| 383 | 387 |
| 384 } // namespace content | 388 } // namespace content |
| 385 | 389 |
| 386 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 390 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
| OLD | NEW |