OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This is the implementation layer of the chrome.automation API, and is | 5 // This is the implementation layer of the chrome.automation API, and is |
6 // essentially a translation of the internal accessibility tree update system | 6 // essentially a translation of the internal accessibility tree update system |
7 // into an extension API. | 7 // into an extension API. |
8 namespace automationInternal { | 8 namespace automationInternal { |
9 // Data for an accessibility event and/or an atomic change to an accessibility | 9 // Data for an accessibility event and/or an atomic change to an accessibility |
10 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of | 10 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of |
(...skipping 11 matching lines...) Expand all Loading... |
22 // The source of this event. | 22 // The source of this event. |
23 DOMString eventFrom; | 23 DOMString eventFrom; |
24 | 24 |
25 // The mouse coordinates when this event fired. | 25 // The mouse coordinates when this event fired. |
26 double mouseX; | 26 double mouseX; |
27 double mouseY; | 27 double mouseY; |
28 }; | 28 }; |
29 | 29 |
30 // All possible actions that can be performed on automation nodes. | 30 // All possible actions that can be performed on automation nodes. |
31 enum ActionType { | 31 enum ActionType { |
| 32 customAction, |
| 33 doDefault, |
32 focus, | 34 focus, |
33 doDefault, | |
34 getImageData, | 35 getImageData, |
35 hitTest, | 36 hitTest, |
36 makeVisible, | 37 makeVisible, |
37 resumeMedia, | 38 resumeMedia, |
38 setAccessibilityFocus, | 39 setAccessibilityFocus, |
39 setSequentialFocusNavigationStartingPoint, | 40 setSequentialFocusNavigationStartingPoint, |
40 setSelection, | 41 setSelection, |
| 42 showContextMenu, |
41 startDuckingMedia, | 43 startDuckingMedia, |
42 stopDuckingMedia, | 44 stopDuckingMedia, |
43 suspendMedia, | 45 suspendMedia |
44 showContextMenu | |
45 }; | 46 }; |
46 | 47 |
47 // Arguments required for all actions supplied to performAction. | 48 // Arguments required for all actions supplied to performAction. |
48 dictionary PerformActionRequiredParams { | 49 dictionary PerformActionRequiredParams { |
49 long treeID; | 50 long treeID; |
50 long automationNodeID; | 51 long automationNodeID; |
51 ActionType actionType; | 52 ActionType actionType; |
52 }; | 53 }; |
53 | 54 |
| 55 // Arguments for the customAction action. Those args are passed to |
| 56 // performAction as opt_args. |
| 57 dictionary PerformCustomActionParams { |
| 58 long customActionID; |
| 59 }; |
| 60 |
54 // Arguments for the setSelection action supplied to performAction. | 61 // Arguments for the setSelection action supplied to performAction. |
55 dictionary SetSelectionParams { | 62 dictionary SetSelectionParams { |
56 // Reuses ActionRequiredParams automationNodeID to mean anchor node id, | 63 // Reuses ActionRequiredParams automationNodeID to mean anchor node id, |
57 // and treeID to apply to both anchor and focus node ids. | 64 // and treeID to apply to both anchor and focus node ids. |
58 long focusNodeID; | 65 long focusNodeID; |
59 long anchorOffset; | 66 long anchorOffset; |
60 long focusOffset; | 67 long focusOffset; |
61 }; | 68 }; |
62 | 69 |
63 // Arguments for the querySelector function. | 70 // Arguments for the querySelector function. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 long nodeID, | 137 long nodeID, |
131 DOMString changeType); | 138 DOMString changeType); |
132 | 139 |
133 static void onChildTreeID(long treeID, long nodeID); | 140 static void onChildTreeID(long treeID, long nodeID); |
134 | 141 |
135 static void onNodesRemoved(long treeID, long[] nodeIDs); | 142 static void onNodesRemoved(long treeID, long[] nodeIDs); |
136 | 143 |
137 static void onAccessibilityTreeSerializationError(long treeID); | 144 static void onAccessibilityTreeSerializationError(long treeID); |
138 }; | 145 }; |
139 }; | 146 }; |
OLD | NEW |