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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 typedef base::StringPairs HtmlAttributes; | 178 typedef base::StringPairs HtmlAttributes; |
179 const HtmlAttributes& GetHtmlAttributes() const; | 179 const HtmlAttributes& GetHtmlAttributes() const; |
180 | 180 |
181 // Returns true if this is a native platform-specific object, vs a | 181 // Returns true if this is a native platform-specific object, vs a |
182 // cross-platform generic object. Don't call ToBrowserAccessibilityXXX if | 182 // cross-platform generic object. Don't call ToBrowserAccessibilityXXX if |
183 // IsNative returns false. | 183 // IsNative returns false. |
184 virtual bool IsNative() const; | 184 virtual bool IsNative() const; |
185 | 185 |
186 #if defined(OS_MACOSX) && __OBJC__ | 186 #if defined(OS_MACOSX) && __OBJC__ |
| 187 const BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa() const; |
187 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); | 188 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); |
188 #elif defined(OS_WIN) | 189 #elif defined(OS_WIN) |
| 190 const BrowserAccessibilityWin* ToBrowserAccessibilityWin() const; |
189 BrowserAccessibilityWin* ToBrowserAccessibilityWin(); | 191 BrowserAccessibilityWin* ToBrowserAccessibilityWin(); |
190 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11) | 192 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11) |
| 193 const BrowserAccessibilityAuraLinux* ToBrowserAccessibilityAuraLinux() const; |
191 BrowserAccessibilityAuraLinux* ToBrowserAccessibilityAuraLinux(); | 194 BrowserAccessibilityAuraLinux* ToBrowserAccessibilityAuraLinux(); |
192 #endif | 195 #endif |
193 | 196 |
194 // Accessing accessibility attributes: | 197 // Accessing accessibility attributes: |
195 // | 198 // |
196 // There are dozens of possible attributes for an accessibility node, | 199 // There are dozens of possible attributes for an accessibility node, |
197 // but only a few tend to apply to any one object, so we store them | 200 // but only a few tend to apply to any one object, so we store them |
198 // in sparse arrays of <attribute id, attribute value> pairs, organized | 201 // in sparse arrays of <attribute id, attribute value> pairs, organized |
199 // by type (bool, int, float, string, int list). | 202 // by type (bool, int, float, string, int list). |
200 // | 203 // |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 // its nearest scrollable ancestor) to local bounds (which are relative | 298 // its nearest scrollable ancestor) to local bounds (which are relative |
296 // to the top of the web accessibility tree). | 299 // to the top of the web accessibility tree). |
297 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; | 300 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; |
298 | 301 |
299 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 302 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
300 }; | 303 }; |
301 | 304 |
302 } // namespace content | 305 } // namespace content |
303 | 306 |
304 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 307 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
OLD | NEW |