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

Side by Side Diff: components/arc/common/accessibility_helper.mojom

Issue 2873373005: Add custom action support (Closed)
Patch Set: Migrate to DataObjectBuilder. Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 // Next MinVersion: 3 5 // Next MinVersion: 4
6 6
7 module arc.mojom; 7 module arc.mojom;
8 8
9 import "screen_rect.mojom"; 9 import "screen_rect.mojom";
10 10
11 // For future maintainers, each of the below enums were hand picked 11 // For future maintainers, each of the below enums were hand picked
12 // from their equivalents in the Android source. Keep them in the 12 // from their equivalents in the Android source. Keep them in the
13 // order given below and add as needed. The initial order matches the 13 // order given below and add as needed. The initial order matches the
14 // order they appear in source files. 14 // order they appear in source files.
15 15
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 PREVIOUS_HTML_ELEMENT, // unused 62 PREVIOUS_HTML_ELEMENT, // unused
63 SCROLL_FORWARD, 63 SCROLL_FORWARD,
64 SCROLL_BACKWARD, 64 SCROLL_BACKWARD,
65 COPY, 65 COPY,
66 PASTE, 66 PASTE,
67 CUT, 67 CUT,
68 SET_SELECTION, 68 SET_SELECTION,
69 EXPAND, 69 EXPAND,
70 COLLAPSE, 70 COLLAPSE,
71 DISMISS, 71 DISMISS,
72 SET_TEXT 72 SET_TEXT,
73 CONTEXT_CLICK,
74 SCROLL_DOWN,
75 SCROLL_LEFT,
76 SCROLL_RIGHT,
77 SCROLL_TO_POSITION,
78 SCROLL_UP,
79 SET_PROGRESS,
80 SHOW_ON_SCREEN,
81 CUSTOM_ACTION // Not a standard action.
73 }; 82 };
74 83
75 // Possible boolean properties set on an AccessibilityNodeInfo. 84 // Possible boolean properties set on an AccessibilityNodeInfo.
76 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html 85 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html
77 // The enum values appear in the same order as they do within 86 // The enum values appear in the same order as they do within
78 // AccessibilityNodeInfo.java. 87 // AccessibilityNodeInfo.java.
79 [Extensible] 88 [Extensible]
80 enum AccessibilityBooleanProperty { 89 enum AccessibilityBooleanProperty {
81 CHECKABLE, 90 CHECKABLE,
82 CHECKED, 91 CHECKED,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 TEXT_SELECTION_END, 132 TEXT_SELECTION_END,
124 INPUT_TYPE, 133 INPUT_TYPE,
125 LIVE_REGION 134 LIVE_REGION
126 }; 135 };
127 136
128 // These fields are taken from List<int> instance members of 137 // These fields are taken from List<int> instance members of
129 // AccessibilityNodeInfo. 138 // AccessibilityNodeInfo.
130 [Extensible] 139 [Extensible]
131 enum AccessibilityIntListProperty { 140 enum AccessibilityIntListProperty {
132 CHILD_NODE_IDS, 141 CHILD_NODE_IDS,
133 ACTIONS 142 CUSTOM_ACTION_IDS
143 };
144
145 [Extensible]
146 enum AccessibilityStringListProperty {
147 CUSTOM_ACTION_DESCRIPTIONS
134 }; 148 };
135 149
136 // AccessibilityNodeInfoData is a struct to contain info of 150 // AccessibilityNodeInfoData is a struct to contain info of
137 // AccessibilityNodeInfo in Android. 151 // AccessibilityNodeInfo in Android.
138 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html 152 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html
139 struct AccessibilityNodeInfoData { 153 struct AccessibilityNodeInfoData {
140 ScreenRect bounds_in_screen; 154 ScreenRect bounds_in_screen;
141 [MinVersion=1]int32 id; 155 [MinVersion=1]int32 id;
142 [MinVersion=1]map<AccessibilityBooleanProperty, bool>? boolean_properties; 156 [MinVersion=1]map<AccessibilityBooleanProperty, bool>? boolean_properties;
143 [MinVersion=1]map<AccessibilityStringProperty, string>? string_properties; 157 [MinVersion=1]map<AccessibilityStringProperty, string>? string_properties;
144 [MinVersion=1]map<AccessibilityIntProperty, int32>? int_properties; 158 [MinVersion=1]map<AccessibilityIntProperty, int32>? int_properties;
145 [MinVersion=1] 159 [MinVersion=1]
146 map<AccessibilityIntListProperty, array<int32>>? int_list_properties; 160 map<AccessibilityIntListProperty, array<int32>>? int_list_properties;
161 [MinVersion=3]map<AccessibilityStringListProperty, array<string>>?
162 string_list_properties;
147 }; 163 };
148 164
149 // Filters the event type (and implicitly the data) sent by the ARC 165 // Filters the event type (and implicitly the data) sent by the ARC
150 // accessibility service. 166 // accessibility service.
151 [Extensible] 167 [Extensible]
152 enum AccessibilityFilterType { 168 enum AccessibilityFilterType {
153 // No events will be sent. 169 // No events will be sent.
154 OFF, 170 OFF,
155 171
156 // Only send focus events along with the source focus node. 172 // Only send focus events along with the source focus node.
157 FOCUS, 173 FOCUS,
158 174
159 // Send a complete tree from the event source's root for every event. 175 // Send a complete tree from the event source's root for every event.
160 ALL, 176 ALL,
161 177
162 // Send complete subtrees for root nodes with whitelisted package names. 178 // Send complete subtrees for root nodes with whitelisted package names.
163 [MinVersion=2]WHITELISTED_PACKAGE_NAME 179 [MinVersion=2]WHITELISTED_PACKAGE_NAME
164 }; 180 };
165 181
166 // AccessibilityEventData is a struct to contain info of 182 // AccessibilityEventData is a struct to contain info of
167 // AccessibilityEvent in Android. 183 // AccessibilityEvent in Android.
168 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityEvent.html 184 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityEvent.html
169 struct AccessibilityEventData { 185 struct AccessibilityEventData {
170 AccessibilityEventType event_type; 186 AccessibilityEventType event_type;
171 int32 source_id; 187 int32 source_id;
172 array<AccessibilityNodeInfoData> node_data; 188 array<AccessibilityNodeInfoData> node_data;
173 }; 189 };
174 190
191 // AccessibilityActionData is a struct to contain info of AccessibilityAction in
192 // Android.
193 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.AccessibilityAction.html
194 struct AccessibilityActionData {
195 int32 node_id;
196
197 AccessibilityActionType action_type;
198
199 // custom_action_id must be set if action_type is CUSTOM_ACTION.
200 int32 custom_action_id;
201 };
202
175 // Next method ID: 2 203 // Next method ID: 2
176 interface AccessibilityHelperHost { 204 interface AccessibilityHelperHost {
177 OnAccessibilityEventDeprecated@0(AccessibilityEventType event_type, 205 OnAccessibilityEventDeprecated@0(AccessibilityEventType event_type,
178 AccessibilityNodeInfoData? event_source); 206 AccessibilityNodeInfoData? event_source);
179 207
180 // OnAccessibilityEvent is called when a converted Android accessibility event 208 // OnAccessibilityEvent is called when a converted Android accessibility event
181 // is sent from Android. 209 // is sent from Android.
182 OnAccessibilityEvent@1(AccessibilityEventData event_data); 210 OnAccessibilityEvent@1(AccessibilityEventData event_data);
183 }; 211 };
184 212
185 // Next method ID: 3 213 // Next method ID: 4
186 interface AccessibilityHelperInstance { 214 interface AccessibilityHelperInstance {
187 Init@0(AccessibilityHelperHost host); 215 Init@0(AccessibilityHelperHost host);
188 216
189 // Perform the specified action on a node requested by a Chrome client. 217 PerformActionDeprecated@1(int32 id, AccessibilityActionType action);
190 PerformAction@1(int32 id, AccessibilityActionType action);
191 218
192 // Set a filter on the event types received. 219 // Set a filter on the event types received.
193 SetFilter@2(AccessibilityFilterType filter_type); 220 SetFilter@2(AccessibilityFilterType filter_type);
221
222 // Perform an action on a node requested by a Chrome client.
223 [MinVersion=3]PerformAction@3(AccessibilityActionData action_data);
194 }; 224 };
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/automation/automation_node.js ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698