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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 }; | 76 }; |
77 | 77 |
78 // Returns the process id and routing id of the tab whose accessibility was | 78 // Returns the process id and routing id of the tab whose accessibility was |
79 // enabled using enable(). | 79 // enabled using enable(). |
80 callback EnableTabCallback = void(long processID, long routingID); | 80 callback EnableTabCallback = void(long processID, long routingID); |
81 | 81 |
82 // Callback called when enableDesktop() returns. | 82 // Callback called when enableDesktop() returns. |
83 callback EnableDesktopCallback = void(); | 83 callback EnableDesktopCallback = void(); |
84 | 84 |
85 interface Functions { | 85 interface Functions { |
86 // Enable automation of the active tab and retrieves its routing id for use | 86 // Enable automation of the tab with the given id, or the active tab if no |
87 // in future updates. | 87 // tab id is given, and retrieves its process and routing ids for use in |
88 static void enableCurrentTab(EnableTabCallback callback); | 88 // future updates. |
| 89 static void enableTab(optional long tabId, EnableTabCallback callback); |
89 | 90 |
90 // Enables desktop automation. | 91 // Enables desktop automation. |
91 static void enableDesktop(EnableDesktopCallback callback); | 92 static void enableDesktop(EnableDesktopCallback callback); |
92 | 93 |
93 // Performs an action on an automation node. | 94 // Performs an action on an automation node. |
94 static void performAction(PerformActionRequiredParams args, | 95 static void performAction(PerformActionRequiredParams args, |
95 object opt_args); | 96 object opt_args); |
96 }; | 97 }; |
97 | 98 |
98 interface Events { | 99 interface Events { |
99 // Fired when an accessibility event occurs | 100 // Fired when an accessibility event occurs |
100 static void onAccessibilityEvent(AXEventParams update); | 101 static void onAccessibilityEvent(AXEventParams update); |
101 }; | 102 }; |
102 }; | 103 }; |
OLD | NEW |