| OLD | NEW |
| 1 // Copyright (c) 2011 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 WEBKIT_TOOLS_TEST_SHELL_ACCESSIBILITY_UI_ELEMENT_H_ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_ACCESSIBILITY_UI_ELEMENT_H_ |
| 6 #define WEBKIT_TOOLS_TEST_SHELL_ACCESSIBILITY_UI_ELEMENT_H_ | 6 #define WEBKIT_TOOLS_TEST_SHELL_ACCESSIBILITY_UI_ELEMENT_H_ |
| 7 | 7 |
| 8 #include "webkit/glue/cpp_bound_class.h" | 8 #include "webkit/glue/cpp_bound_class.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
| 10 | 10 |
| 11 class AccessibilityUIElement : public CppBoundClass { | 11 class AccessibilityUIElement : public webkit_glue::CppBoundClass { |
| 12 public: | 12 public: |
| 13 class Factory { | 13 class Factory { |
| 14 public: | 14 public: |
| 15 virtual ~Factory() { } | 15 virtual ~Factory() { } |
| 16 virtual AccessibilityUIElement* Create( | 16 virtual AccessibilityUIElement* Create( |
| 17 const WebKit::WebAccessibilityObject& object) = 0; | 17 const WebKit::WebAccessibilityObject& object) = 0; |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 AccessibilityUIElement( | 20 AccessibilityUIElement( |
| 21 const WebKit::WebAccessibilityObject& accessibility_object, | 21 const WebKit::WebAccessibilityObject& accessibility_object, |
| 22 Factory* factory); | 22 Factory* factory); |
| 23 virtual ~AccessibilityUIElement(); | 23 virtual ~AccessibilityUIElement(); |
| 24 | 24 |
| 25 virtual AccessibilityUIElement* GetChildAtIndex(unsigned index); | 25 virtual AccessibilityUIElement* GetChildAtIndex(unsigned index); |
| 26 virtual bool IsRoot() const; | 26 virtual bool IsRoot() const; |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 const WebKit::WebAccessibilityObject& accessibility_object() const { | 29 const WebKit::WebAccessibilityObject& accessibility_object() const { |
| 30 return accessibility_object_; | 30 return accessibility_object_; |
| 31 } | 31 } |
| 32 Factory* factory() const { return factory_; } | 32 Factory* factory() const { return factory_; } |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // Bound methods and properties. | 35 // Bound methods and properties. |
| 36 void AllAttributesCallback(const CppArgumentList& args, CppVariant* result); | 36 void AllAttributesCallback( |
| 37 const webkit_glue::CppArgumentList& args, |
| 38 webkit_glue::CppVariant* result); |
| 37 void AttributesOfLinkedUIElementsCallback( | 39 void AttributesOfLinkedUIElementsCallback( |
| 38 const CppArgumentList& args, CppVariant* result); | 40 const webkit_glue::CppArgumentList& args, |
| 41 webkit_glue::CppVariant* result); |
| 39 void AttributesOfDocumentLinksCallback( | 42 void AttributesOfDocumentLinksCallback( |
| 40 const CppArgumentList& args, CppVariant* result); | 43 const webkit_glue::CppArgumentList& args, |
| 44 webkit_glue::CppVariant* result); |
| 41 void AttributesOfChildrenCallback( | 45 void AttributesOfChildrenCallback( |
| 42 const CppArgumentList& args, CppVariant* result); | 46 const webkit_glue::CppArgumentList& args, |
| 47 webkit_glue::CppVariant* result); |
| 43 void ParametrizedAttributeNamesCallback( | 48 void ParametrizedAttributeNamesCallback( |
| 44 const CppArgumentList& args, CppVariant* result); | 49 const webkit_glue::CppArgumentList& args, |
| 45 void LineForIndexCallback(const CppArgumentList& args, CppVariant* result); | 50 webkit_glue::CppVariant* result); |
| 46 void BoundsForRangeCallback(const CppArgumentList& args, CppVariant* result); | 51 void LineForIndexCallback( |
| 47 void StringForRangeCallback(const CppArgumentList& args, CppVariant* result); | 52 const webkit_glue::CppArgumentList& args, |
| 48 void ChildAtIndexCallback(const CppArgumentList& args, CppVariant* result); | 53 webkit_glue::CppVariant* result); |
| 49 void ElementAtPointCallback(const CppArgumentList& args, CppVariant* result); | 54 void BoundsForRangeCallback( |
| 55 const webkit_glue::CppArgumentList& args, |
| 56 webkit_glue::CppVariant* result); |
| 57 void StringForRangeCallback( |
| 58 const webkit_glue::CppArgumentList& args, |
| 59 webkit_glue::CppVariant* result); |
| 60 void ChildAtIndexCallback( |
| 61 const webkit_glue::CppArgumentList& args, |
| 62 webkit_glue::CppVariant* result); |
| 63 void ElementAtPointCallback( |
| 64 const webkit_glue::CppArgumentList& args, |
| 65 webkit_glue::CppVariant* result); |
| 50 void AttributesOfColumnHeadersCallback( | 66 void AttributesOfColumnHeadersCallback( |
| 51 const CppArgumentList& args, CppVariant* result); | 67 const webkit_glue::CppArgumentList& args, |
| 68 webkit_glue::CppVariant* result); |
| 52 void AttributesOfRowHeadersCallback( | 69 void AttributesOfRowHeadersCallback( |
| 53 const CppArgumentList& args, CppVariant* result); | 70 const webkit_glue::CppArgumentList& args, |
| 71 webkit_glue::CppVariant* result); |
| 54 void AttributesOfColumnsCallback( | 72 void AttributesOfColumnsCallback( |
| 55 const CppArgumentList& args, CppVariant* result); | 73 const webkit_glue::CppArgumentList& args, |
| 74 webkit_glue::CppVariant* result); |
| 56 void AttributesOfRowsCallback( | 75 void AttributesOfRowsCallback( |
| 57 const CppArgumentList& args, CppVariant* result); | 76 const webkit_glue::CppArgumentList& args, |
| 77 webkit_glue::CppVariant* result); |
| 58 void AttributesOfVisibleCellsCallback( | 78 void AttributesOfVisibleCellsCallback( |
| 59 const CppArgumentList& args, CppVariant* result); | 79 const webkit_glue::CppArgumentList& args, |
| 80 webkit_glue::CppVariant* result); |
| 60 void AttributesOfHeaderCallback( | 81 void AttributesOfHeaderCallback( |
| 61 const CppArgumentList& args, CppVariant* result); | 82 const webkit_glue::CppArgumentList& args, |
| 62 void IndexInTableCallback(const CppArgumentList& args, CppVariant* result); | 83 webkit_glue::CppVariant* result); |
| 63 void RowIndexRangeCallback(const CppArgumentList& args, CppVariant* result); | 84 void IndexInTableCallback( |
| 85 const webkit_glue::CppArgumentList& args, |
| 86 webkit_glue::CppVariant* result); |
| 87 void RowIndexRangeCallback( |
| 88 const webkit_glue::CppArgumentList& args, |
| 89 webkit_glue::CppVariant* result); |
| 64 void ColumnIndexRangeCallback( | 90 void ColumnIndexRangeCallback( |
| 65 const CppArgumentList& args, CppVariant* result); | 91 const webkit_glue::CppArgumentList& args, |
| 92 webkit_glue::CppVariant* result); |
| 66 void CellForColumnAndRowCallback( | 93 void CellForColumnAndRowCallback( |
| 67 const CppArgumentList& args, CppVariant* result); | 94 const webkit_glue::CppArgumentList& args, |
| 68 void TitleUIElementCallback(const CppArgumentList& args, CppVariant* result); | 95 webkit_glue::CppVariant* result); |
| 96 void TitleUIElementCallback( |
| 97 const webkit_glue::CppArgumentList& args, |
| 98 webkit_glue::CppVariant* result); |
| 69 void SetSelectedTextRangeCallback( | 99 void SetSelectedTextRangeCallback( |
| 70 const CppArgumentList& args, CppVariant* result); | 100 const webkit_glue::CppArgumentList& args, |
| 71 void AttributeValueCallback(const CppArgumentList& args, CppVariant* result); | 101 webkit_glue::CppVariant* result); |
| 102 void AttributeValueCallback( |
| 103 const webkit_glue::CppArgumentList& args, |
| 104 webkit_glue::CppVariant* result); |
| 72 void IsAttributeSettableCallback( | 105 void IsAttributeSettableCallback( |
| 73 const CppArgumentList& args, CppVariant* result); | 106 const webkit_glue::CppArgumentList& args, |
| 107 webkit_glue::CppVariant* result); |
| 74 void IsActionSupportedCallback( | 108 void IsActionSupportedCallback( |
| 75 const CppArgumentList& args, CppVariant* result); | 109 const webkit_glue::CppArgumentList& args, |
| 76 void ParentElementCallback(const CppArgumentList& args, CppVariant* result); | 110 webkit_glue::CppVariant* result); |
| 77 void IncrementCallback(const CppArgumentList& args, CppVariant* result); | 111 void ParentElementCallback( |
| 78 void DecrementCallback(const CppArgumentList& args, CppVariant* result); | 112 const webkit_glue::CppArgumentList& args, |
| 79 void FallbackCallback(const CppArgumentList& args, CppVariant* result); | 113 webkit_glue::CppVariant* result); |
| 114 void IncrementCallback( |
| 115 const webkit_glue::CppArgumentList& args, |
| 116 webkit_glue::CppVariant* result); |
| 117 void DecrementCallback( |
| 118 const webkit_glue::CppArgumentList& args, |
| 119 webkit_glue::CppVariant* result); |
| 120 void FallbackCallback( |
| 121 const webkit_glue::CppArgumentList& args, |
| 122 webkit_glue::CppVariant* result); |
| 80 | 123 |
| 81 void ChildrenCountGetterCallback(CppVariant* result); | 124 void ChildrenCountGetterCallback(webkit_glue::CppVariant* result); |
| 82 void DescriptionGetterCallback(CppVariant* result); | 125 void DescriptionGetterCallback(webkit_glue::CppVariant* result); |
| 83 void IsEnabledGetterCallback(CppVariant* result); | 126 void IsEnabledGetterCallback(webkit_glue::CppVariant* result); |
| 84 void IsSelectedGetterCallback(CppVariant* result); | 127 void IsSelectedGetterCallback(webkit_glue::CppVariant* result); |
| 85 void RoleGetterCallback(CppVariant* result); | 128 void RoleGetterCallback(webkit_glue::CppVariant* result); |
| 86 void TitleGetterCallback(CppVariant* result); | 129 void TitleGetterCallback(webkit_glue::CppVariant* result); |
| 87 | 130 |
| 88 CppVariant subrole_; | 131 webkit_glue::CppVariant subrole_; |
| 89 CppVariant language_; | 132 webkit_glue::CppVariant language_; |
| 90 CppVariant x_; | 133 webkit_glue::CppVariant x_; |
| 91 CppVariant y_; | 134 webkit_glue::CppVariant y_; |
| 92 CppVariant width_; | 135 webkit_glue::CppVariant width_; |
| 93 CppVariant height_; | 136 webkit_glue::CppVariant height_; |
| 94 CppVariant click_point_x_; | 137 webkit_glue::CppVariant click_point_x_; |
| 95 CppVariant click_point_y_; | 138 webkit_glue::CppVariant click_point_y_; |
| 96 CppVariant int_value_; | 139 webkit_glue::CppVariant int_value_; |
| 97 CppVariant min_value_; | 140 webkit_glue::CppVariant min_value_; |
| 98 CppVariant max_value_; | 141 webkit_glue::CppVariant max_value_; |
| 99 CppVariant children_count_; | 142 webkit_glue::CppVariant children_count_; |
| 100 CppVariant insertion_point_line_number_; | 143 webkit_glue::CppVariant insertion_point_line_number_; |
| 101 CppVariant selected_text_range; | 144 webkit_glue::CppVariant selected_text_range; |
| 102 CppVariant is_required_; | 145 webkit_glue::CppVariant is_required_; |
| 103 CppVariant value_description_; | 146 webkit_glue::CppVariant value_description_; |
| 104 | 147 |
| 105 WebKit::WebAccessibilityObject accessibility_object_; | 148 WebKit::WebAccessibilityObject accessibility_object_; |
| 106 Factory* factory_; | 149 Factory* factory_; |
| 107 }; | 150 }; |
| 108 | 151 |
| 109 | 152 |
| 110 class RootAccessibilityUIElement : public AccessibilityUIElement { | 153 class RootAccessibilityUIElement : public AccessibilityUIElement { |
| 111 public: | 154 public: |
| 112 RootAccessibilityUIElement( | 155 RootAccessibilityUIElement( |
| 113 const WebKit::WebAccessibilityObject& accessibility_object, | 156 const WebKit::WebAccessibilityObject& accessibility_object, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 132 const WebKit::WebAccessibilityObject& object) OVERRIDE; | 175 const WebKit::WebAccessibilityObject& object) OVERRIDE; |
| 133 AccessibilityUIElement* CreateRoot( | 176 AccessibilityUIElement* CreateRoot( |
| 134 const WebKit::WebAccessibilityObject& object); | 177 const WebKit::WebAccessibilityObject& object); |
| 135 | 178 |
| 136 private: | 179 private: |
| 137 typedef std::vector<AccessibilityUIElement*> ElementList; | 180 typedef std::vector<AccessibilityUIElement*> ElementList; |
| 138 ElementList elements_; | 181 ElementList elements_; |
| 139 }; | 182 }; |
| 140 | 183 |
| 141 #endif // WEBKIT_TOOLS_TEST_SHELL_ACCESSIBILITY_UI_ELEMENT_H_ | 184 #endif // WEBKIT_TOOLS_TEST_SHELL_ACCESSIBILITY_UI_ELEMENT_H_ |
| OLD | NEW |