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/accessibility_node_data.h" | 15 #include "content/common/accessibility_node_data.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 | 18 |
18 #if defined(OS_MACOSX) && __OBJC__ | 19 #if defined(OS_MACOSX) && __OBJC__ |
19 @class BrowserAccessibilityCocoa; | 20 @class BrowserAccessibilityCocoa; |
20 #endif | 21 #endif |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 class BrowserAccessibilityManager; | 24 class BrowserAccessibilityManager; |
24 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
25 class BrowserAccessibilityWin; | 26 class BrowserAccessibilityWin; |
26 #elif defined(TOOLKIT_GTK) | 27 #elif defined(TOOLKIT_GTK) |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // aria-selected (selectable) | 225 // aria-selected (selectable) |
225 // aria-grabbed (grabbable) | 226 // aria-grabbed (grabbable) |
226 // aria-expanded (expandable) | 227 // aria-expanded (expandable) |
227 // aria-pressed (toggleable/pressable) -- supports 4th "mixed" state | 228 // aria-pressed (toggleable/pressable) -- supports 4th "mixed" state |
228 // aria-checked (checkable) -- supports 4th "mixed state" | 229 // aria-checked (checkable) -- supports 4th "mixed state" |
229 bool GetAriaTristate(const char* attr_name, | 230 bool GetAriaTristate(const char* attr_name, |
230 bool* is_defined, | 231 bool* is_defined, |
231 bool* is_mixed) const; | 232 bool* is_mixed) const; |
232 | 233 |
233 // Returns true if the bit corresponding to the given state enum is 1. | 234 // Returns true if the bit corresponding to the given state enum is 1. |
234 bool HasState(AccessibilityNodeData::State state_enum) const; | 235 bool HasState(WebKit::WebAXState state_enum) const; |
235 | 236 |
236 // Returns true if this node is an editable text field of any kind. | 237 // Returns true if this node is an editable text field of any kind. |
237 bool IsEditableText() const; | 238 bool IsEditableText() const; |
238 | 239 |
239 // Append the text from this node and its children. | 240 // Append the text from this node and its children. |
240 std::string GetTextRecursive() const; | 241 std::string GetTextRecursive() const; |
241 | 242 |
242 protected: | 243 protected: |
243 // Perform platform specific initialization. This can be called multiple times | 244 // Perform platform specific initialization. This can be called multiple times |
244 // during the lifetime of this instance after the members of this base object | 245 // during the lifetime of this instance after the members of this base object |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // immediately return failure. | 291 // immediately return failure. |
291 bool instance_active_; | 292 bool instance_active_; |
292 | 293 |
293 private: | 294 private: |
294 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 295 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); |
295 }; | 296 }; |
296 | 297 |
297 } // namespace content | 298 } // namespace content |
298 | 299 |
299 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ | 300 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ |
OLD | NEW |