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 dictionary Rect { | 9 dictionary Rect { |
10 long left; | 10 long left; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 long automationNodeID; | 78 long automationNodeID; |
79 ActionType actionType; | 79 ActionType actionType; |
80 }; | 80 }; |
81 | 81 |
82 // Arguments for the set_selection action supplied to performAction. | 82 // Arguments for the set_selection action supplied to performAction. |
83 dictionary SetSelectionParams { | 83 dictionary SetSelectionParams { |
84 long startIndex; | 84 long startIndex; |
85 long endIndex; | 85 long endIndex; |
86 }; | 86 }; |
87 | 87 |
88 dictionary QuerySelectorRequiredParams { | |
Devlin
2014/10/29 21:23:43
comments.
aboxhall
2014/10/30 18:34:18
Done.
| |
89 long processID; | |
90 long routingID; | |
91 long automationNodeID; | |
92 DOMString selector; | |
93 }; | |
94 | |
88 // Returns the process id and routing id of the tab whose accessibility was | 95 // Returns the process id and routing id of the tab whose accessibility was |
89 // enabled using enable(). | 96 // enabled using enable(). |
90 callback EnableTabCallback = void(long processID, long routingID); | 97 callback EnableTabCallback = void(long processID, long routingID); |
91 | 98 |
92 // Callback called when enableDesktop() returns. | 99 // Callback called when enableDesktop() returns. |
93 callback EnableDesktopCallback = void(); | 100 callback EnableDesktopCallback = void(); |
94 | 101 |
102 callback QuerySelectorCallback = void(long resultAutomationNodeID); | |
103 | |
95 interface Functions { | 104 interface Functions { |
96 // Enable automation of the tab with the given id, or the active tab if no | 105 // Enable automation of the tab with the given id, or the active tab if no |
97 // tab id is given, and retrieves its process and routing ids for use in | 106 // tab id is given, and retrieves its process and routing ids for use in |
98 // future updates. | 107 // future updates. |
99 static void enableTab(optional long tabId, EnableTabCallback callback); | 108 static void enableTab(optional long tabId, EnableTabCallback callback); |
100 | 109 |
101 // Enables desktop automation. | 110 // Enables desktop automation. |
102 static void enableDesktop(EnableDesktopCallback callback); | 111 static void enableDesktop(EnableDesktopCallback callback); |
103 | 112 |
104 // Performs an action on an automation node. | 113 // Performs an action on an automation node. |
105 static void performAction(PerformActionRequiredParams args, | 114 static void performAction(PerformActionRequiredParams args, |
106 object opt_args); | 115 object opt_args); |
116 | |
117 // Performs a query selector query. Calls the callback with a request ID to | |
Devlin
2014/10/29 21:23:43
It's odd that this is the only place you use the t
aboxhall
2014/10/30 18:34:18
Ah, that comment is out of date - fixed.
| |
118 // be used in matching the response to the request. | |
119 static void querySelector(QuerySelectorRequiredParams args, | |
120 QuerySelectorCallback callback); | |
107 }; | 121 }; |
108 | 122 |
109 interface Events { | 123 interface Events { |
110 // Fired when an accessibility event occurs | 124 // Fired when an accessibility event occurs |
111 static void onAccessibilityEvent(AXEventParams update); | 125 static void onAccessibilityEvent(AXEventParams update); |
112 | 126 |
113 static void onAccessibilityTreeDestroyed(long processID, long routingID); | 127 static void onAccessibilityTreeDestroyed(long processID, long routingID); |
114 }; | 128 }; |
115 }; | 129 }; |
OLD | NEW |