Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Side by Side Diff: content/common/accessibility_messages.h

Issue 2410333005: Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)
Patch Set: Fix Android compile Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "ipc/ipc_message_macros.h" 11 #include "ipc/ipc_message_macros.h"
12 #include "ipc/ipc_message_utils.h" 12 #include "ipc/ipc_message_utils.h"
13 #include "ipc/ipc_param_traits.h" 13 #include "ipc/ipc_param_traits.h"
14 #include "ipc/param_traits_macros.h" 14 #include "ipc/param_traits_macros.h"
15 #include "third_party/WebKit/public/web/WebAXEnums.h" 15 #include "third_party/WebKit/public/web/WebAXEnums.h"
16 #include "ui/accessibility/ax_action_data.h"
16 #include "ui/accessibility/ax_node_data.h" 17 #include "ui/accessibility/ax_node_data.h"
17 #include "ui/accessibility/ax_relative_bounds.h" 18 #include "ui/accessibility/ax_relative_bounds.h"
18 #include "ui/accessibility/ax_tree_update.h" 19 #include "ui/accessibility/ax_tree_update.h"
19 #include "ui/gfx/transform.h" 20 #include "ui/gfx/transform.h"
20 21
21 #undef IPC_MESSAGE_EXPORT 22 #undef IPC_MESSAGE_EXPORT
22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 23 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
23 24
24 #define IPC_MESSAGE_START AccessibilityMsgStart 25 #define IPC_MESSAGE_START AccessibilityMsgStart
25 26
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 110
110 // The id of the accessibility object for the end of the match range. 111 // The id of the accessibility object for the end of the match range.
111 IPC_STRUCT_MEMBER(int, end_id) 112 IPC_STRUCT_MEMBER(int, end_id)
112 113
113 // The character offset into the text of the end object. 114 // The character offset into the text of the end object.
114 IPC_STRUCT_MEMBER(int, end_offset) 115 IPC_STRUCT_MEMBER(int, end_offset)
115 IPC_STRUCT_END() 116 IPC_STRUCT_END()
116 117
117 // Messages sent from the browser to the renderer. 118 // Messages sent from the browser to the renderer.
118 119
119 // Relay a request from assistive technology to set focus to a given node. 120 // Relay a request from assistive technology to perform an action,
120 IPC_MESSAGE_ROUTED1(AccessibilityMsg_SetFocus, 121 // such as focusing or clicking on a node.
121 int /* object id */) 122 IPC_MESSAGE_ROUTED2(AccessibilityMsg_PerformAction,
122 123 ui::AXAction /* which action to perform */,
123 // Relay a request from assistive technology to perform the default action 124 ui::AXActionData /* action parameters */)
124 // on a given node.
125 IPC_MESSAGE_ROUTED1(AccessibilityMsg_DoDefaultAction,
126 int /* object id */)
127
128 // Relay a request from assistive technology to make a given object
129 // visible by scrolling as many scrollable containers as possible.
130 // In addition, if it's not possible to make the entire object visible,
131 // scroll so that the |subfocus| rect is visible at least. The subfocus
132 // rect is in local coordinates of the object itself.
133 IPC_MESSAGE_ROUTED2(AccessibilityMsg_ScrollToMakeVisible,
134 int /* object id */,
135 gfx::Rect /* subfocus */)
136
137 // Relay a request from assistive technology to show the context menu for a
138 // given object.
139 IPC_MESSAGE_ROUTED1(AccessibilityMsg_ShowContextMenu, int /* object id */)
140
141 // Relay a request from assistive technology to move a given object
142 // to a specific location, in the WebContents area coordinate space, i.e.
143 // (0, 0) is the top-left corner of the WebContents.
144 IPC_MESSAGE_ROUTED2(AccessibilityMsg_ScrollToPoint,
145 int /* object id */,
146 gfx::Point /* new location */)
147
148 // Relay a request from assistive technology to set the scroll offset
149 // of an accessibility object that's a scroll container, to a specific
150 // offset.
151 IPC_MESSAGE_ROUTED2(AccessibilityMsg_SetScrollOffset,
152 int /* object id */,
153 gfx::Point /* new offset */)
154
155 // Relay a request from assistive technology to set the cursor or
156 // selection within a document.
157 IPC_MESSAGE_ROUTED4(AccessibilityMsg_SetSelection,
158 int /* New anchor object id */,
159 int /* New anchor offset */,
160 int /* New focus object id */,
161 int /* New focus offset */)
162
163 // Relay a request from assistive technology to set the value of an
164 // editable text element.
165 IPC_MESSAGE_ROUTED2(AccessibilityMsg_SetValue,
166 int /* object id */,
167 base::string16 /* Value */)
168 125
169 // Determine the accessibility object under a given point. 126 // Determine the accessibility object under a given point.
170 // 127 //
171 // If the target is an object with a child frame (like if the hit test 128 // If the target is an object with a child frame (like if the hit test
172 // result is an iframe element), it responds with 129 // result is an iframe element), it responds with
173 // AccessibilityHostMsg_ChildFrameHitTestResult so that the 130 // AccessibilityHostMsg_ChildFrameHitTestResult so that the
174 // hit test can be performed recursively on the child frame. Otherwise 131 // hit test can be performed recursively on the child frame. Otherwise
175 // it fires an accessibility event of type ui::AX_EVENT_HOVER on the target. 132 // it fires an accessibility event of type ui::AX_EVENT_HOVER on the target.
176 IPC_MESSAGE_ROUTED1(AccessibilityMsg_HitTest, 133 IPC_MESSAGE_ROUTED1(AccessibilityMsg_HitTest,
177 gfx::Point /* location to test */) 134 gfx::Point /* location to test */)
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_ChildFrameHitTestResult, 195 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_ChildFrameHitTestResult,
239 gfx::Point /* location tested */, 196 gfx::Point /* location tested */,
240 int /* node id of result */) 197 int /* node id of result */)
241 198
242 // Sent in response to AccessibilityMsg_SnapshotTree. The callback id that was 199 // Sent in response to AccessibilityMsg_SnapshotTree. The callback id that was
243 // passed to the request will be returned in |callback_id|, along with 200 // passed to the request will be returned in |callback_id|, along with
244 // a standalone snapshot of the accessibility tree. 201 // a standalone snapshot of the accessibility tree.
245 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_SnapshotResponse, 202 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_SnapshotResponse,
246 int /* callback_id */, 203 int /* callback_id */,
247 content::AXContentTreeUpdate) 204 content::AXContentTreeUpdate)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698