Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1849)

Side by Side Diff: content/browser/accessibility/browser_accessibility.h

Issue 660633002: Fixed IAccessibleText::TextAtOffset with IA2_TEXT_BOUNDARY_WORD to return text that spans from the … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved manual test changes to another branch. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "third_party/WebKit/public/web/WebAXEnums.h" 17 #include "third_party/WebKit/public/web/WebAXEnums.h"
18 #include "ui/accessibility/ax_node.h" 18 #include "ui/accessibility/ax_node.h"
19 #include "ui/accessibility/ax_node_data.h" 19 #include "ui/accessibility/ax_node_data.h"
20 20
21 #if defined(OS_MACOSX) && __OBJC__ 21 #if defined(OS_MACOSX) && __OBJC__
22 @class BrowserAccessibilityCocoa; 22 @class BrowserAccessibilityCocoa;
23 #endif 23 #endif
24 24
25 namespace ui {
26 enum TextBoundaryDirection;
27 }
28
25 namespace content { 29 namespace content {
26 class BrowserAccessibilityManager; 30 class BrowserAccessibilityManager;
27 #if defined(OS_WIN) 31 #if defined(OS_WIN)
28 class BrowserAccessibilityWin; 32 class BrowserAccessibilityWin;
29 #endif 33 #endif
30 34
31 //////////////////////////////////////////////////////////////////////////////// 35 ////////////////////////////////////////////////////////////////////////////////
32 // 36 //
33 // BrowserAccessibility 37 // BrowserAccessibility
34 // 38 //
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 108
105 // Returns the bounds of the given range in coordinates relative to the 109 // Returns the bounds of the given range in coordinates relative to the
106 // top-left corner of the overall web area. Only valid when the 110 // top-left corner of the overall web area. Only valid when the
107 // role is WebAXRoleStaticText. 111 // role is WebAXRoleStaticText.
108 gfx::Rect GetLocalBoundsForRange(int start, int len) const; 112 gfx::Rect GetLocalBoundsForRange(int start, int len) const;
109 113
110 // Same as GetLocalBoundsForRange, in screen coordinates. Only valid when 114 // Same as GetLocalBoundsForRange, in screen coordinates. Only valid when
111 // the role is WebAXRoleStaticText. 115 // the role is WebAXRoleStaticText.
112 gfx::Rect GetGlobalBoundsForRange(int start, int len) const; 116 gfx::Rect GetGlobalBoundsForRange(int start, int len) const;
113 117
118 // Searches in the given text and from the given offset until the start of
119 // the next or previous word is found and returns its position.
120 int GetWordStartBoundary(
121 int start, ui::TextBoundaryDirection direction) const;
122
114 // Returns the deepest descendant that contains the specified point 123 // Returns the deepest descendant that contains the specified point
115 // (in global screen coordinates). 124 // (in global screen coordinates).
116 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point); 125 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point);
117 126
118 // Marks this object for deletion, releases our reference to it, and 127 // Marks this object for deletion, releases our reference to it, and
119 // nulls out the pointer to the underlying AXNode. May not delete 128 // nulls out the pointer to the underlying AXNode. May not delete
120 // the object immediately due to reference counting. 129 // the object immediately due to reference counting.
121 // 130 //
122 // Reference counting is used on some platforms because the 131 // Reference counting is used on some platforms because the
123 // operating system may hold onto a reference to a BrowserAccessibility 132 // operating system may hold onto a reference to a BrowserAccessibility
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // its nearest scrollable ancestor) to local bounds (which are relative 280 // its nearest scrollable ancestor) to local bounds (which are relative
272 // to the top of the web accessibility tree). 281 // to the top of the web accessibility tree).
273 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; 282 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const;
274 283
275 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 284 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
276 }; 285 };
277 286
278 } // namespace content 287 } // namespace content
279 288
280 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 289 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698