Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / common / extensions / api / automation_internal.idl
blob6f568cfac6eba888dc5bb48d03b7ed63d08dbf64
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
3 // found in the LICENSE file.
5 // This is the implementation layer of the chrome.automation API, and is
6 // essentially a translation of the internal accessibility tree update system
7 // into an extension API.
8 namespace automationInternal {
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
11 // the tree update format.
12 [nocompile] dictionary AXEventParams {
13 // The tree id of the web contents that this update is for.
14 long treeID;
16 // ID of the node that the event applies to.
17 long targetID;
19 // The type of event that this update represents.
20 DOMString eventType;
23 // All possible actions that can be performed on automation nodes.
24 enum ActionType {
25 focus,
26 doDefault,
27 makeVisible,
28 setSelection,
29 showContextMenu
32 // Arguments required for all actions supplied to performAction.
33 dictionary PerformActionRequiredParams {
34 long treeID;
35 long automationNodeID;
36 ActionType actionType;
39 // Arguments for the set_selection action supplied to performAction.
40 dictionary SetSelectionParams {
41 long startIndex;
42 long endIndex;
45 // Arguments for the querySelector function.
46 dictionary QuerySelectorRequiredParams {
47 long treeID;
48 long automationNodeID;
49 DOMString selector;
52 // Arguments for the enableTab function.
53 dictionary EnableTabParams {
54 long routingID;
55 long? tabID;
58 // Returns the accessibility tree id of the web contents who's accessibility
59 // was enabled using enableTab().
60 callback EnableTabCallback = void(long tree_id);
62 // Callback called when enableDesktop() returns.
63 callback EnableDesktopCallback = void();
65 // Callback called when querySelector() returns.
66 callback QuerySelectorCallback = void(long resultAutomationNodeID);
68 interface Functions {
69 // Enable automation of the tab with the given id, or the active tab if no
70 // tab id is given, and retrieves accessibility tree id for use in
71 // future updates.
72 static void enableTab(EnableTabParams args,
73 EnableTabCallback callback);
75 // Enable automation of the frame with the given tree id.
76 static void enableFrame(long tree_id);
78 // Enables desktop automation.
79 static void enableDesktop(long routingID,
80 EnableDesktopCallback callback);
82 // Performs an action on an automation node.
83 static void performAction(PerformActionRequiredParams args,
84 object opt_args);
86 // Performs a query selector query.
87 static void querySelector(QuerySelectorRequiredParams args,
88 QuerySelectorCallback callback);
91 interface Events {
92 // Fired when an accessibility event occurs
93 static void onAccessibilityEvent(AXEventParams update);
95 static void onAccessibilityTreeDestroyed(long treeID);
97 static void onTreeChange(long treeID, long nodeID, DOMString changeType);