| 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> |
| 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 "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "third_party/WebKit/public/web/WebAXEnums.h" | 16 #include "third_party/WebKit/public/web/WebAXEnums.h" |
| 17 #include "ui/accessibility/ax_node_data.h" | 17 #include "ui/accessibility/ax_node_data.h" |
| 18 | 18 |
| 19 #if defined(OS_MACOSX) && __OBJC__ | 19 #if defined(OS_MACOSX) && __OBJC__ |
| 20 @class BrowserAccessibilityCocoa; | 20 @class BrowserAccessibilityCocoa; |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 class BrowserAccessibilityManager; | 24 class BrowserAccessibilityManager; |
| 25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
| 26 class BrowserAccessibilityWin; | 26 class BrowserAccessibilityWin; |
| 27 #elif defined(TOOLKIT_GTK) | |
| 28 class BrowserAccessibilityGtk; | |
| 29 #endif | 27 #endif |
| 30 | 28 |
| 31 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
| 32 // | 30 // |
| 33 // BrowserAccessibility | 31 // BrowserAccessibility |
| 34 // | 32 // |
| 35 // Class implementing the cross platform interface for the Browser-Renderer | 33 // Class implementing the cross platform interface for the Browser-Renderer |
| 36 // communication of accessibility information, providing accessibility | 34 // communication of accessibility information, providing accessibility |
| 37 // to be used by screen readers and other assistive technology (AT). | 35 // to be used by screen readers and other assistive technology (AT). |
| 38 // | 36 // |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 int32 GetState() const { return data_.state; } | 175 int32 GetState() const { return data_.state; } |
| 178 const std::vector<std::pair<std::string, std::string> >& GetHtmlAttributes() | 176 const std::vector<std::pair<std::string, std::string> >& GetHtmlAttributes() |
| 179 const { | 177 const { |
| 180 return data_.html_attributes; | 178 return data_.html_attributes; |
| 181 } | 179 } |
| 182 | 180 |
| 183 #if defined(OS_MACOSX) && __OBJC__ | 181 #if defined(OS_MACOSX) && __OBJC__ |
| 184 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); | 182 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); |
| 185 #elif defined(OS_WIN) | 183 #elif defined(OS_WIN) |
| 186 BrowserAccessibilityWin* ToBrowserAccessibilityWin(); | 184 BrowserAccessibilityWin* ToBrowserAccessibilityWin(); |
| 187 #elif defined(TOOLKIT_GTK) | |
| 188 BrowserAccessibilityGtk* ToBrowserAccessibilityGtk(); | |
| 189 #endif | 185 #endif |
| 190 | 186 |
| 191 // Accessing accessibility attributes: | 187 // Accessing accessibility attributes: |
| 192 // | 188 // |
| 193 // There are dozens of possible attributes for an accessibility node, | 189 // There are dozens of possible attributes for an accessibility node, |
| 194 // but only a few tend to apply to any one object, so we store them | 190 // but only a few tend to apply to any one object, so we store them |
| 195 // in sparse arrays of <attribute id, attribute value> pairs, organized | 191 // in sparse arrays of <attribute id, attribute value> pairs, organized |
| 196 // by type (bool, int, float, string, int list). | 192 // by type (bool, int, float, string, int list). |
| 197 // | 193 // |
| 198 // There are three accessors for each type of attribute: one that returns | 194 // There are three accessors for each type of attribute: one that returns |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // immediately return failure. | 300 // immediately return failure. |
| 305 bool instance_active_; | 301 bool instance_active_; |
| 306 | 302 |
| 307 private: | 303 private: |
| 308 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 304 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
| 309 }; | 305 }; |
| 310 | 306 |
| 311 } // namespace content | 307 } // namespace content |
| 312 | 308 |
| 313 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 309 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
| OLD | NEW |