Temporarily re-enabling SizeAfterPrefChange test with traces (this time for Linux...
[chromium-blink-merge.git] / chrome / common / extensions / api / automation_internal.idl
blob1b1d721f4c83fe492e88fe424bf6265d53e88549
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 dictionary Rect {
10 long left;
11 long top;
12 long width;
13 long height;
16 // A compact representation of the accessibility information for a
17 // single web object, in a form that can be serialized and sent from
18 // one process to another.
19 // See ui/accessibility/ax_node_data.h
20 dictionary AXNodeData {
21 long id;
22 DOMString role;
23 object state;
24 Rect location;
26 object? boolAttributes;
27 object? floatAttributes;
28 object? htmlAttributes;
29 object? intAttributes;
30 object? intlistAttributes;
31 object? stringAttributes;
32 long[] childIds;
35 // Data for an accessibility event and/or an atomic change to an accessibility
36 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of
37 // the tree update format.
38 dictionary AXEventParams {
39 // The process id of the renderer host.
40 long processID;
42 // The routing id of the web contents that this update is for.
43 long routingID;
45 // ID of the node that the event applies to.
46 long targetID;
48 // The type of event that this update represents.
49 DOMString eventType;
51 // A vector of nodes to update according to the rules described in
52 // ui/ax_tree_update.h.
53 AXNodeData[] nodes;
56 // All possible actions that can be performed on automation nodes.
57 enum ActionType {
58 focus,
59 doDefault,
60 makeVisible,
61 setSelection
64 // Arguments required for all actions supplied to performAction.
65 dictionary PerformActionRequiredParams {
66 long processID;
67 long routingID;
68 long automationNodeID;
69 ActionType actionType;
72 // Arguments for the set_selection action supplied to performAction.
73 dictionary SetSelectionParams {
74 long startIndex;
75 long endIndex;
78 // Returns the process id and routing id of the tab whose accessibility was
79 // enabled using enable().
80 callback EnableTabCallback = void(long processID, long routingID);
82 // Callback called when enableDesktop() returns.
83 callback EnableDesktopCallback = void();
85 interface Functions {
86 // Enable automation of the tab with the given id, or the active tab if no
87 // tab id is given, and retrieves its process and routing ids for use in
88 // future updates.
89 static void enableTab(optional long tabId, EnableTabCallback callback);
91 // Enables desktop automation.
92 static void enableDesktop(EnableDesktopCallback callback);
94 // Performs an action on an automation node.
95 static void performAction(PerformActionRequiredParams args,
96 object opt_args);
99 interface Events {
100 // Fired when an accessibility event occurs
101 static void onAccessibilityEvent(AXEventParams update);