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

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

Issue 2430473003: Revert of Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)
Patch Set: 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"
17 #include "ui/accessibility/ax_node_data.h" 16 #include "ui/accessibility/ax_node_data.h"
18 #include "ui/accessibility/ax_relative_bounds.h" 17 #include "ui/accessibility/ax_relative_bounds.h"
19 #include "ui/accessibility/ax_tree_update.h" 18 #include "ui/accessibility/ax_tree_update.h"
20 #include "ui/gfx/transform.h" 19 #include "ui/gfx/transform.h"
21 20
22 #undef IPC_MESSAGE_EXPORT 21 #undef IPC_MESSAGE_EXPORT
23 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
24 23
25 #define IPC_MESSAGE_START AccessibilityMsgStart 24 #define IPC_MESSAGE_START AccessibilityMsgStart
26 25
27 IPC_ENUM_TRAITS_MAX_VALUE(content::AXContentIntAttribute, 26 IPC_ENUM_TRAITS_MAX_VALUE(content::AXContentIntAttribute,
28 content::AX_CONTENT_INT_ATTRIBUTE_LAST) 27 content::AX_CONTENT_INT_ATTRIBUTE_LAST)
29 IPC_ENUM_TRAITS_MAX_VALUE(ui::AXAction, ui::AX_ACTION_LAST)
30
31 IPC_STRUCT_TRAITS_BEGIN(ui::AXActionData)
32 IPC_STRUCT_TRAITS_MEMBER(action)
33 IPC_STRUCT_TRAITS_MEMBER(target_node_id)
34 IPC_STRUCT_TRAITS_MEMBER(flags)
35 IPC_STRUCT_TRAITS_MEMBER(anchor_node_id)
36 IPC_STRUCT_TRAITS_MEMBER(anchor_offset)
37 IPC_STRUCT_TRAITS_MEMBER(focus_node_id)
38 IPC_STRUCT_TRAITS_MEMBER(focus_offset)
39 IPC_STRUCT_TRAITS_MEMBER(target_rect)
40 IPC_STRUCT_TRAITS_MEMBER(target_point)
41 IPC_STRUCT_TRAITS_MEMBER(value)
42 IPC_STRUCT_TRAITS_END()
43 28
44 IPC_STRUCT_TRAITS_BEGIN(content::AXContentNodeData) 29 IPC_STRUCT_TRAITS_BEGIN(content::AXContentNodeData)
45 IPC_STRUCT_TRAITS_MEMBER(id) 30 IPC_STRUCT_TRAITS_MEMBER(id)
46 IPC_STRUCT_TRAITS_MEMBER(role) 31 IPC_STRUCT_TRAITS_MEMBER(role)
47 IPC_STRUCT_TRAITS_MEMBER(state) 32 IPC_STRUCT_TRAITS_MEMBER(state)
48 IPC_STRUCT_TRAITS_MEMBER(location) 33 IPC_STRUCT_TRAITS_MEMBER(location)
49 IPC_STRUCT_TRAITS_MEMBER(transform) 34 IPC_STRUCT_TRAITS_MEMBER(transform)
50 IPC_STRUCT_TRAITS_MEMBER(string_attributes) 35 IPC_STRUCT_TRAITS_MEMBER(string_attributes)
51 IPC_STRUCT_TRAITS_MEMBER(int_attributes) 36 IPC_STRUCT_TRAITS_MEMBER(int_attributes)
52 IPC_STRUCT_TRAITS_MEMBER(float_attributes) 37 IPC_STRUCT_TRAITS_MEMBER(float_attributes)
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 109
125 // The id of the accessibility object for the end of the match range. 110 // The id of the accessibility object for the end of the match range.
126 IPC_STRUCT_MEMBER(int, end_id) 111 IPC_STRUCT_MEMBER(int, end_id)
127 112
128 // The character offset into the text of the end object. 113 // The character offset into the text of the end object.
129 IPC_STRUCT_MEMBER(int, end_offset) 114 IPC_STRUCT_MEMBER(int, end_offset)
130 IPC_STRUCT_END() 115 IPC_STRUCT_END()
131 116
132 // Messages sent from the browser to the renderer. 117 // Messages sent from the browser to the renderer.
133 118
134 // Relay a request from assistive technology to perform an action, 119 // Relay a request from assistive technology to set focus to a given node.
135 // such as focusing or clicking on a node. 120 IPC_MESSAGE_ROUTED1(AccessibilityMsg_SetFocus,
136 IPC_MESSAGE_ROUTED1(AccessibilityMsg_PerformAction, 121 int /* object id */)
137 ui::AXActionData /* action parameters */) 122
123 // Relay a request from assistive technology to perform the default action
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 */)
138 168
139 // Determine the accessibility object under a given point. 169 // Determine the accessibility object under a given point.
140 // 170 //
141 // If the target is an object with a child frame (like if the hit test 171 // If the target is an object with a child frame (like if the hit test
142 // result is an iframe element), it responds with 172 // result is an iframe element), it responds with
143 // AccessibilityHostMsg_ChildFrameHitTestResult so that the 173 // AccessibilityHostMsg_ChildFrameHitTestResult so that the
144 // hit test can be performed recursively on the child frame. Otherwise 174 // hit test can be performed recursively on the child frame. Otherwise
145 // it fires an accessibility event of type ui::AX_EVENT_HOVER on the target. 175 // it fires an accessibility event of type ui::AX_EVENT_HOVER on the target.
146 IPC_MESSAGE_ROUTED1(AccessibilityMsg_HitTest, 176 IPC_MESSAGE_ROUTED1(AccessibilityMsg_HitTest,
147 gfx::Point /* location to test */) 177 gfx::Point /* location to test */)
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_ChildFrameHitTestResult, 238 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_ChildFrameHitTestResult,
209 gfx::Point /* location tested */, 239 gfx::Point /* location tested */,
210 int /* node id of result */) 240 int /* node id of result */)
211 241
212 // Sent in response to AccessibilityMsg_SnapshotTree. The callback id that was 242 // Sent in response to AccessibilityMsg_SnapshotTree. The callback id that was
213 // passed to the request will be returned in |callback_id|, along with 243 // passed to the request will be returned in |callback_id|, along with
214 // a standalone snapshot of the accessibility tree. 244 // a standalone snapshot of the accessibility tree.
215 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_SnapshotResponse, 245 IPC_MESSAGE_ROUTED2(AccessibilityHostMsg_SnapshotResponse,
216 int /* callback_id */, 246 int /* callback_id */,
217 content::AXContentTreeUpdate) 247 content::AXContentTreeUpdate)
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/public/browser/render_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698