Chromium Code Reviews| 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, | |
| 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 Loading... | |
| 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>>? string_list _properties; | |
|
Luis Héctor Chávez
2017/06/13 15:00:22
nit: 80col
yawano
2017/06/14 01:13:07
Done.
| |
| 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. |
| 157 FOCUS, | 172 FOCUS, |
| 158 | 173 |
| 159 // Send a complete tree from the event source's root for every event. | 174 // Send a complete tree from the event source's root for every event. |
| 160 ALL, | 175 ALL, |
| 161 | 176 |
| 162 // Send complete subtrees for root nodes with whitelisted package names. | 177 // Send complete subtrees for root nodes with whitelisted package names. |
| 163 [MinVersion=2]WHITELISTED_PACKAGE_NAME | 178 [MinVersion=2]WHITELISTED_PACKAGE_NAME |
| 164 }; | 179 }; |
| 165 | 180 |
| 166 // AccessibilityEventData is a struct to contain info of | 181 // AccessibilityEventData is a struct to contain info of |
| 167 // AccessibilityEvent in Android. | 182 // AccessibilityEvent in Android. |
| 168 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityEvent.html | 183 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityEvent.html |
| 169 struct AccessibilityEventData { | 184 struct AccessibilityEventData { |
| 170 AccessibilityEventType event_type; | 185 AccessibilityEventType event_type; |
| 171 int32 source_id; | 186 int32 source_id; |
| 172 array<AccessibilityNodeInfoData> node_data; | 187 array<AccessibilityNodeInfoData> node_data; |
| 173 }; | 188 }; |
| 174 | 189 |
| 190 // AccessibilityActionData is a struct to contain info of AccessibilityAction in | |
| 191 // Android. | |
| 192 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.AccessibilityAction.html | |
| 193 struct AccessibilityActionData { | |
| 194 AccessibilityActionType action_type; | |
| 195 | |
| 196 // custom_action_id must be set if action_type is CUSTOM_ACTION. | |
| 197 int32 custom_action_id; | |
| 198 }; | |
| 199 | |
| 175 // Next method ID: 2 | 200 // Next method ID: 2 |
| 176 interface AccessibilityHelperHost { | 201 interface AccessibilityHelperHost { |
| 177 OnAccessibilityEventDeprecated@0(AccessibilityEventType event_type, | 202 OnAccessibilityEventDeprecated@0(AccessibilityEventType event_type, |
| 178 AccessibilityNodeInfoData? event_source); | 203 AccessibilityNodeInfoData? event_source); |
| 179 | 204 |
| 180 // OnAccessibilityEvent is called when a converted Android accessibility event | 205 // OnAccessibilityEvent is called when a converted Android accessibility event |
| 181 // is sent from Android. | 206 // is sent from Android. |
| 182 OnAccessibilityEvent@1(AccessibilityEventData event_data); | 207 OnAccessibilityEvent@1(AccessibilityEventData event_data); |
| 183 }; | 208 }; |
| 184 | 209 |
| 185 // Next method ID: 3 | 210 // Next method ID: 4 |
| 186 interface AccessibilityHelperInstance { | 211 interface AccessibilityHelperInstance { |
| 187 Init@0(AccessibilityHelperHost host); | 212 Init@0(AccessibilityHelperHost host); |
| 188 | 213 |
| 189 // Perform the specified action on a node requested by a Chrome client. | 214 PerformActionDeprecated@1(int32 id, AccessibilityActionType action); |
| 190 PerformAction@1(int32 id, AccessibilityActionType action); | |
| 191 | 215 |
| 192 // Set a filter on the event types received. | 216 // Set a filter on the event types received. |
| 193 SetFilter@2(AccessibilityFilterType filter_type); | 217 SetFilter@2(AccessibilityFilterType filter_type); |
| 218 | |
| 219 // Perform an action on a node requested by a Chrome client. | |
| 220 [MinVersion=3]PerformAction@3(int32 node_id, AccessibilityActionData action_da ta); | |
|
Luis Héctor Chávez
2017/06/13 15:00:22
nit: 80col
David Tseng
2017/06/13 17:02:05
nit: Could just make node_id part of the Accessibi
yawano
2017/06/14 01:13:07
Done.
| |
| 194 }; | 221 }; |
| OLD | NEW |