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 // IPC messages for accessibility. | 5 // IPC messages for accessibility. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "content/common/ax_content_node_data.h" | 8 #include "content/common/ax_content_node_data.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/common/view_message_enums.h" | 10 #include "content/common/view_message_enums.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 gfx::Point /* location to test */) | 174 gfx::Point /* location to test */) |
175 | 175 |
176 // Relay a request from assistive technology to set accessibility focus | 176 // Relay a request from assistive technology to set accessibility focus |
177 // to a given node. On platforms where this is used (currently Android), | 177 // to a given node. On platforms where this is used (currently Android), |
178 // inline text boxes are only computed for the node with accessibility focus, | 178 // inline text boxes are only computed for the node with accessibility focus, |
179 // rather than for the whole tree. | 179 // rather than for the whole tree. |
180 IPC_MESSAGE_ROUTED1(AccessibilityMsg_SetAccessibilityFocus, | 180 IPC_MESSAGE_ROUTED1(AccessibilityMsg_SetAccessibilityFocus, |
181 int /* object id */) | 181 int /* object id */) |
182 | 182 |
183 // Tells the render view that a AccessibilityHostMsg_Events | 183 // Tells the render view that a AccessibilityHostMsg_Events |
184 // message was processed and it can send addition events. | 184 // message was processed and it can send addition events. The argument |
Tom Sepez
2016/09/13 21:31:49
nit: additional
dmazzoni
2016/09/14 18:59:26
Fixed
| |
185 IPC_MESSAGE_ROUTED0(AccessibilityMsg_Events_ACK) | 185 // must be the same as the ack_token passed to AccessibilityHostMsg_Events. |
186 IPC_MESSAGE_ROUTED1(AccessibilityMsg_Events_ACK, | |
187 int /* ack_token */) | |
186 | 188 |
187 // Tell the renderer to reset and send a new accessibility tree from | 189 // Tell the renderer to reset and send a new accessibility tree from |
188 // scratch because the browser is out of sync. It passes a sequential | 190 // scratch because the browser is out of sync. It passes a sequential |
189 // reset token. This should be rare, and if we need reset the same renderer | 191 // reset token. This should be rare, and if we need reset the same renderer |
190 // too many times we just kill it. After sending a reset, the browser ignores | 192 // too many times we just kill it. After sending a reset, the browser ignores |
191 // incoming accessibility IPCs until it receives one with the matching reset | 193 // incoming accessibility IPCs until it receives one with the matching reset |
192 // token. Conversely, it ignores IPCs with a reset token if it was not | 194 // token. Conversely, it ignores IPCs with a reset token if it was not |
193 // expecting a reset. | 195 // expecting a reset. |
194 IPC_MESSAGE_ROUTED1(AccessibilityMsg_Reset, | 196 IPC_MESSAGE_ROUTED1(AccessibilityMsg_Reset, |
195 int /* reset token */) | 197 int /* reset token */) |
196 | 198 |
197 // Kill the renderer because we got a fatal error in the accessibility tree | 199 // Kill the renderer because we got a fatal error in the accessibility tree |
198 // and we've already reset too many times. | 200 // and we've already reset too many times. |
199 IPC_MESSAGE_ROUTED0(AccessibilityMsg_FatalError) | 201 IPC_MESSAGE_ROUTED0(AccessibilityMsg_FatalError) |
200 | 202 |
201 // Request a one-time snapshot of the accessibility tree without | 203 // Request a one-time snapshot of the accessibility tree without |
202 // enabling accessibility if it wasn't already enabled. The passed id | 204 // enabling accessibility if it wasn't already enabled. The passed id |
203 // will be returned in the AccessibilityHostMsg_SnapshotResponse message. | 205 // will be returned in the AccessibilityHostMsg_SnapshotResponse message. |
204 IPC_MESSAGE_ROUTED1(AccessibilityMsg_SnapshotTree, | 206 IPC_MESSAGE_ROUTED1(AccessibilityMsg_SnapshotTree, |
205 int /* callback id */) | 207 int /* callback id */) |
206 | 208 |
207 // Messages sent from the renderer to the browser. | 209 // Messages sent from the renderer to the browser. |
208 | 210 |
209 // Sent to notify the browser about renderer accessibility events. | 211 // Sent to notify the browser about renderer accessibility events. |
210 // The browser responds with a AccessibilityMsg_Events_ACK. | 212 // The browser responds with a AccessibilityMsg_Events_ACK with the same |
213 // ack_token. | |
211 // The second parameter, reset_token, is set if this IPC was sent in response | 214 // The second parameter, reset_token, is set if this IPC was sent in response |
212 // to a reset request from the browser. When the browser requests a reset, | 215 // to a reset request from the browser. When the browser requests a reset, |
213 // it ignores incoming IPCs until it sees one with the correct reset token. | 216 // it ignores incoming IPCs until it sees one with the correct reset token. |
214 // Any other time, it ignores IPCs with a reset token. | 217 // Any other time, it ignores IPCs with a reset token. |
215 IPC_MESSAGE_ROUTED2( | 218 IPC_MESSAGE_ROUTED3( |
216 AccessibilityHostMsg_Events, | 219 AccessibilityHostMsg_Events, |
217 std::vector<AccessibilityHostMsg_EventParams> /* events */, | 220 std::vector<AccessibilityHostMsg_EventParams> /* events */, |
218 int /* reset_token */) | 221 int /* reset_token */, |
222 int /* ack_token */) | |
219 | 223 |
220 // Sent to update the browser of the location of accessibility objects. | 224 // Sent to update the browser of the location of accessibility objects. |
221 IPC_MESSAGE_ROUTED1( | 225 IPC_MESSAGE_ROUTED1( |
222 AccessibilityHostMsg_LocationChanges, | 226 AccessibilityHostMsg_LocationChanges, |
223 std::vector<AccessibilityHostMsg_LocationChangeParams>) | 227 std::vector<AccessibilityHostMsg_LocationChangeParams>) |
224 | 228 |
225 // Sent to update the browser of Find In Page results. | 229 // Sent to update the browser of Find In Page results. |
226 IPC_MESSAGE_ROUTED1( | 230 IPC_MESSAGE_ROUTED1( |
227 AccessibilityHostMsg_FindInPageResult, | 231 AccessibilityHostMsg_FindInPageResult, |
228 AccessibilityHostMsg_FindInPageResultParams) | 232 AccessibilityHostMsg_FindInPageResultParams) |
229 | 233 |
230 // Sent in response to AccessibilityMsg_HitTest. | 234 // Sent in response to AccessibilityMsg_HitTest. |
231 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_ChildFrameHitTestResult, | 235 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_ChildFrameHitTestResult, |
232 gfx::Point /* location tested */, | 236 gfx::Point /* location tested */, |
233 int /* node id of result */) | 237 int /* node id of result */) |
234 | 238 |
235 // Sent in response to AccessibilityMsg_SnapshotTree. The callback id that was | 239 // Sent in response to AccessibilityMsg_SnapshotTree. The callback id that was |
236 // passed to the request will be returned in |callback_id|, along with | 240 // passed to the request will be returned in |callback_id|, along with |
237 // a standalone snapshot of the accessibility tree. | 241 // a standalone snapshot of the accessibility tree. |
238 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_SnapshotResponse, | 242 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_SnapshotResponse, |
239 int /* callback_id */, | 243 int /* callback_id */, |
240 content::AXContentTreeUpdate) | 244 content::AXContentTreeUpdate) |
OLD | NEW |