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

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

Issue 2640123004: Initial support for native accessibility in ARC (Closed)
Patch Set: Rebase. Created 3 years, 10 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
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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: 1 5 // Next MinVersion: 2
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 // AccessibilityEventType is a enum which corresponds to event types of 11 // For future maintainers, each of the below enums were hand picked
12 // AccessibilityEvent in Android. 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
14 // order they appear in source files.
15
16 // AccessibilityEventType lists the possible accessibility events on Android.
13 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityEvent.html 17 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityEvent.html
14 [Extensible] 18 [Extensible]
15 enum AccessibilityEventType { 19 enum AccessibilityEventType {
16 VIEW_FOCUSED, 20 VIEW_FOCUSED,
21 VIEW_CLICKED,
22 VIEW_LONG_CLICKED,
23 VIEW_SELECTED,
24 VIEW_TEXT_CHANGED,
25 WINDOW_STATE_CHANGED,
26 NOTIFICATION_STATE_CHANGED,
27 VIEW_HOVER_ENTER,
28 VIEW_HOVER_EXIT,
29 TOUCH_EXPLORATION_GESTURE_START,
30 TOUCH_EXPLORATION_GESTURE_END,
31 WINDOW_CONTENT_CHANGED,
32 VIEW_SCROLLED,
33 VIEW_TEXT_SELECTION_CHANGED,
34 ANNOUNCEMENT,
35 VIEW_ACCESSIBILITY_FOCUSED,
36 VIEW_ACCESSIBILITY_FOCUS_CLEARED,
37 VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY,
38 GESTURE_DETECTION_START,
39 GESTURE_DETECTION_END,
40 TOUCH_INTERACTION_START,
41 TOUCH_INTERACTION_END,
42 WINDOWS_CHANGED,
43 VIEW_CONTEXT_CLICKED,
44 ASSIST_READING_CONTEXT,
45 };
46
47 // AccessibilityActionType lists possible accessibility actions on Android.
48 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html
49 [Extensible]
50 enum AccessibilityActionType {
51 FOCUS,
52 CLEAR_FOCUS,
53 SELECT,
54 CLEAR_SELECTION,
55 CLICK,
56 LONG_CLICK,
57 ACCESSIBILITY_FOCUS,
58 CLEAR_ACCESSIBILITY_FOCUS,
59 NEXT_AT_MOVEMENT_GRANULARITY, // unused
60 PREVIOUS_AT_MOVEMENT_GRANULARITY, // unused
61 NEXT_HTML_ELEMENT, // unused
62 PREVIOUS_HTML_ELEMENT, // unused
63 SCROLL_FORWARD,
64 SCROLL_BACKWARD,
65 COPY,
66 PASTE,
67 CUT,
68 SET_SELECTION,
69 EXPAND,
70 COLLAPSE,
71 DISMISS,
72 SET_TEXT
73 };
74
75 // Possible boolean properties set on an AccessibilityNodeInfo.
76 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html
77 // The enum values appear in the same order as they do within
78 // AccessibilityNodeInfo.java.
79 [Extensible]
80 enum AccessibilityBooleanProperty {
81 CHECKABLE,
82 CHECKED,
83 FOCUSABLE,
84 FOCUSED,
85 SELECTED,
86 CLICKABLE,
87 LONG_CLICKABLE,
88 ENABLED,
89 PASSWORD,
90 SCROLLABLE,
91 ACCESSIBILITY_FOCUSED,
92 VISIBLE_TO_USER,
93 EDITABLE,
94 OPENS_POPUP,
95 DISMISSABLE,
96 MULTI_LINE,
97 CONTENT_INVALID,
98 CONTEXT_CLICKABLE,
99 IMPORTANCE
100 };
101
102 // These fields are taken from string instance members of
103 // AccessibilityNodeInfo.
104 [Extensible]
105 enum AccessibilityStringProperty {
106 PACKAGE_NAME,
107 CLASS_NAME,
108 TEXT,
109 CONTENT_DESCRIPTION,
110 VIEW_ID_RESOURCE_NAME
111 };
112
113 // These fields are taken from int instance members of
114 // AccessibilityNodeInfo.
115 [Extensible]
116 enum AccessibilityIntProperty {
117 LABEL_FOR,
118 LABELED_BY,
119 TRAVERSAL_BEFORE,
120 TRAVERSAL_AFTER,
121 MAX_TEXT_LENGTH,
122 TEXT_SELECTION_START,
123 TEXT_SELECTION_END,
124 INPUT_TYPE,
125 LIVE_REGION
126 };
127
128 // These fields are taken from List<int> instance members of
129 // AccessibilityNodeInfo.
130 [Extensible]
131 enum AccessibilityIntListProperty {
132 CHILD_NODE_IDS,
133 ACTIONS
17 }; 134 };
18 135
19 // AccessibilityNodeInfoData is a struct to contain info of 136 // AccessibilityNodeInfoData is a struct to contain info of
20 // AccessibilityNodeInfo in Android. 137 // AccessibilityNodeInfo in Android.
21 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html 138 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityNodeInfo.html
22 struct AccessibilityNodeInfoData { 139 struct AccessibilityNodeInfoData {
23 ScreenRect boundsInScreen; 140 ScreenRect boundsInScreen;
141 [MinVersion=1]int32 id;
142 [MinVersion=1]map<AccessibilityBooleanProperty, bool>? booleanProperties;
143 [MinVersion=1]map<AccessibilityStringProperty, string>? stringProperties;
144 [MinVersion=1]map<AccessibilityIntProperty, int32>? intProperties;
145 [MinVersion=1]map<AccessibilityIntListProperty, array<int32>>? intListProperti es;
24 }; 146 };
25 147
26 // Next method ID: 1 148 // Filters the event type (and implicitly the data) sent by the ARC
149 // accessibility service.
150 [Extensible]
151 enum AccessibilityFilterType {
152 // No events will be sent.
153 OFF,
154
155 // Only send focus events along with the source focus node.
156 FOCUS,
157
158 // Send a complete tree from the event source's root for every event.
159 ALL
160 };
161
162 // AccessibilityEventData is a struct to contain info of
163 // AccessibilityEvent in Android.
164 // https://developer.android.com/reference/android/view/accessibility/Accessibil ityEvent.html
165 struct AccessibilityEventData {
166 AccessibilityEventType eventType;
167 int32 sourceId;
168 array<AccessibilityNodeInfoData> nodeData;
169 };
170
171 // Next method ID: 2
27 interface AccessibilityHelperHost { 172 interface AccessibilityHelperHost {
173 OnAccessibilityEventDeprecated@0(AccessibilityEventType eventType,
174 AccessibilityNodeInfoData? eventSource);
175
28 // OnAccessibilityEvent is called when a converted Android accessibility event 176 // OnAccessibilityEvent is called when a converted Android accessibility event
29 // is sent from Android. 177 // is sent from Android.
30 OnAccessibilityEvent@0(AccessibilityEventType eventType, 178 OnAccessibilityEvent@1(AccessibilityEventData eventData);
31 AccessibilityNodeInfoData? eventSource);
32 }; 179 };
33 180
34 // Next method ID: 1 181 // Next method ID: 3
35 interface AccessibilityHelperInstance { 182 interface AccessibilityHelperInstance {
36 Init@0(AccessibilityHelperHost host); 183 Init@0(AccessibilityHelperHost host);
184
185 // Perform the specified action on a node requested by a Chrome client.
186 PerformAction@1(int32 id, AccessibilityActionType action);
187
188 // Set a filter on the event types received.
189 SetFilter@2(AccessibilityFilterType filterType);
37 }; 190 };
OLDNEW
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698