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; | |
188 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); | 187 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); |
189 #elif defined(OS_WIN) | 188 #elif defined(OS_WIN) |
190 const BrowserAccessibilityWin* ToBrowserAccessibilityWin() const; | |
191 BrowserAccessibilityWin* ToBrowserAccessibilityWin(); | 189 BrowserAccessibilityWin* ToBrowserAccessibilityWin(); |
192 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11) | 190 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11) |
193 const BrowserAccessibilityAuraLinux* ToBrowserAccessibilityAuraLinux() const; | |
194 BrowserAccessibilityAuraLinux* ToBrowserAccessibilityAuraLinux(); | 191 BrowserAccessibilityAuraLinux* ToBrowserAccessibilityAuraLinux(); |
195 #endif | 192 #endif |
196 | 193 |
197 // Accessing accessibility attributes: | 194 // Accessing accessibility attributes: |
198 // | 195 // |
199 // There are dozens of possible attributes for an accessibility node, | 196 // There are dozens of possible attributes for an accessibility node, |
200 // but only a few tend to apply to any one object, so we store them | 197 // but only a few tend to apply to any one object, so we store them |
201 // in sparse arrays of <attribute id, attribute value> pairs, organized | 198 // in sparse arrays of <attribute id, attribute value> pairs, organized |
202 // by type (bool, int, float, string, int list). | 199 // by type (bool, int, float, string, int list). |
203 // | 200 // |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 // its nearest scrollable ancestor) to local bounds (which are relative | 295 // its nearest scrollable ancestor) to local bounds (which are relative |
299 // to the top of the web accessibility tree). | 296 // to the top of the web accessibility tree). |
300 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; | 297 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; |
301 | 298 |
302 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 299 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
303 }; | 300 }; |
304 | 301 |
305 } // namespace content | 302 } // namespace content |
306 | 303 |
307 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 304 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
OLD | NEW |