OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_GLUE_WEBACCESSIBILITY_H_ | 5 #ifndef WEBKIT_GLUE_WEBACCESSIBILITY_H_ |
6 #define WEBKIT_GLUE_WEBACCESSIBILITY_H_ | 6 #define WEBKIT_GLUE_WEBACCESSIBILITY_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 | 9 |
10 namespace WebKit { | 10 namespace WebKit { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 STATE_LINKED, | 116 STATE_LINKED, |
117 STATE_MULTISELECTABLE, | 117 STATE_MULTISELECTABLE, |
118 STATE_OFFSCREEN, | 118 STATE_OFFSCREEN, |
119 STATE_PRESSED, | 119 STATE_PRESSED, |
120 STATE_PROTECTED, | 120 STATE_PROTECTED, |
121 STATE_READONLY, | 121 STATE_READONLY, |
122 STATE_TRAVERSED, | 122 STATE_TRAVERSED, |
123 STATE_UNAVAILABLE | 123 STATE_UNAVAILABLE |
124 }; | 124 }; |
125 | 125 |
| 126 enum ReturnCode { |
| 127 RETURNCODE_TRUE, // MSAA S_OK |
| 128 RETURNCODE_FALSE, // MSAA S_FALSE |
| 129 RETURNCODE_FAIL // E_FAIL |
| 130 }; |
| 131 |
126 // Parameters structure to hold a union of the possible accessibility function | 132 // Parameters structure to hold a union of the possible accessibility function |
127 // INPUT variables, with the unused fields always set to default value. Used | 133 // INPUT variables, with the unused fields always set to default value. Used |
128 // in ViewMsg_GetAccessibilityInfo, as only parameter. | 134 // in ViewMsg_GetAccessibilityInfo, as only parameter. |
129 struct InParams { | 135 struct InParams { |
130 // Identifier to uniquely distinguish which instance of accessibility | 136 // Identifier to uniquely distinguish which instance of accessibility |
131 // information is being called upon on the renderer side. | 137 // information is being called upon on the renderer side. |
132 int object_id; | 138 int object_id; |
133 | 139 |
134 // Identifier to resolve which accessibility information retrieval function | 140 // Identifier to resolve which accessibility information retrieval function |
135 // is being called. | 141 // is being called. |
(...skipping 20 matching lines...) Expand all Loading... |
156 // the child object found by the called IAccessible function is not a simple | 162 // the child object found by the called IAccessible function is not a simple |
157 // object. | 163 // object. |
158 long output_long1; | 164 long output_long1; |
159 long output_long2; | 165 long output_long2; |
160 long output_long3; | 166 long output_long3; |
161 long output_long4; | 167 long output_long4; |
162 | 168 |
163 // String output parameter. | 169 // String output parameter. |
164 string16 output_string; | 170 string16 output_string; |
165 | 171 |
166 // Return code, either true (MSAA S_OK) or false (MSAA S_FALSE). | 172 // Return code of the accessibility function call. |
167 // Interface-specific error return codes (e.g. MSAA's E_POINTER, | 173 int32 return_code; |
168 // E_INVALIDARG, E_FAIL, E_NOTIMPL) must be handled on the browser side by | |
169 // input validation. | |
170 bool return_code; | |
171 }; | 174 }; |
172 | 175 |
173 static bool GetAccObjInfo(WebKit::WebAccessibilityCache* cache, | 176 static int32 GetAccObjInfo(WebKit::WebAccessibilityCache* cache, |
174 const InParams& in_params, OutParams* out_params); | 177 const InParams& in_params, OutParams* out_params); |
175 }; | 178 }; |
176 | 179 |
177 } // namespace webkit_glue | 180 } // namespace webkit_glue |
178 | 181 |
179 #endif // WEBKIT_GLUE_WEBACCESSIBILITY_H_ | 182 #endif // WEBKIT_GLUE_WEBACCESSIBILITY_H_ |
OLD | NEW |