OLD | NEW |
---|---|
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 Loading... | |
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 | |
73 }; | 81 }; |
74 | 82 |
75 // Possible boolean properties set on an AccessibilityNodeInfo. | 83 // Possible boolean properties set on an AccessibilityNodeInfo. |
76 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html | 84 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html |
77 // The enum values appear in the same order as they do within | 85 // The enum values appear in the same order as they do within |
78 // AccessibilityNodeInfo.java. | 86 // AccessibilityNodeInfo.java. |
79 [Extensible] | 87 [Extensible] |
80 enum AccessibilityBooleanProperty { | 88 enum AccessibilityBooleanProperty { |
81 CHECKABLE, | 89 CHECKABLE, |
82 CHECKED, | 90 CHECKED, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 TEXT_SELECTION_END, | 131 TEXT_SELECTION_END, |
124 INPUT_TYPE, | 132 INPUT_TYPE, |
125 LIVE_REGION | 133 LIVE_REGION |
126 }; | 134 }; |
127 | 135 |
128 // These fields are taken from List<int> instance members of | 136 // These fields are taken from List<int> instance members of |
129 // AccessibilityNodeInfo. | 137 // AccessibilityNodeInfo. |
130 [Extensible] | 138 [Extensible] |
131 enum AccessibilityIntListProperty { | 139 enum AccessibilityIntListProperty { |
132 CHILD_NODE_IDS, | 140 CHILD_NODE_IDS, |
133 ACTIONS | 141 ACTIONS, |
David Tseng
2017/06/08 17:21:59
This doesn't appear to be used. It might be safe t
yawano
2017/06/13 06:58:47
Done.
| |
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>>? string_list _properties; | |
147 }; | 162 }; |
148 | 163 |
149 // Filters the event type (and implicitly the data) sent by the ARC | 164 // Filters the event type (and implicitly the data) sent by the ARC |
150 // accessibility service. | 165 // accessibility service. |
151 [Extensible] | 166 [Extensible] |
152 enum AccessibilityFilterType { | 167 enum AccessibilityFilterType { |
153 // No events will be sent. | 168 // No events will be sent. |
154 OFF, | 169 OFF, |
155 | 170 |
156 // Only send focus events along with the source focus node. | 171 // Only send focus events along with the source focus node. |
(...skipping 18 matching lines...) Expand all Loading... | |
175 // Next method ID: 2 | 190 // Next method ID: 2 |
176 interface AccessibilityHelperHost { | 191 interface AccessibilityHelperHost { |
177 OnAccessibilityEventDeprecated@0(AccessibilityEventType event_type, | 192 OnAccessibilityEventDeprecated@0(AccessibilityEventType event_type, |
178 AccessibilityNodeInfoData? event_source); | 193 AccessibilityNodeInfoData? event_source); |
179 | 194 |
180 // OnAccessibilityEvent is called when a converted Android accessibility event | 195 // OnAccessibilityEvent is called when a converted Android accessibility event |
181 // is sent from Android. | 196 // is sent from Android. |
182 OnAccessibilityEvent@1(AccessibilityEventData event_data); | 197 OnAccessibilityEvent@1(AccessibilityEventData event_data); |
183 }; | 198 }; |
184 | 199 |
185 // Next method ID: 3 | 200 // Next method ID: 4 |
186 interface AccessibilityHelperInstance { | 201 interface AccessibilityHelperInstance { |
187 Init@0(AccessibilityHelperHost host); | 202 Init@0(AccessibilityHelperHost host); |
188 | 203 |
189 // Perform the specified action on a node requested by a Chrome client. | 204 // Perform the specified action on a node requested by a Chrome client. |
190 PerformAction@1(int32 id, AccessibilityActionType action); | 205 PerformAction@1(int32 id, AccessibilityActionType action); |
191 | 206 |
192 // Set a filter on the event types received. | 207 // Set a filter on the event types received. |
193 SetFilter@2(AccessibilityFilterType filter_type); | 208 SetFilter@2(AccessibilityFilterType filter_type); |
209 | |
210 // Perform a custom action on a node requested by a Chrome client. | |
211 [MinVersion=3]PerformCustomAction@3(int32 id, int32 custom_action_id); | |
David Tseng
2017/06/08 17:21:59
Considering we might want just one action list in
yawano
2017/06/09 08:03:01
I would prefer to keep standard action and custom
David Tseng
2017/06/09 18:01:32
I should be more clear. I was thinking:
performAct
yawano
2017/06/12 01:46:52
My point was that it would make sense to keep stan
David Tseng
2017/06/12 16:55:01
Totally understood. However, the automation api pa
yawano
2017/06/13 06:58:47
Changed PerformAction to take AccessibilityActionD
| |
194 }; | 212 }; |
OLD | NEW |