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 // A compact representation of the accessibility information for a
10 // single web object, in a form that can be serialized and sent from
11 // one process to another.
12 // See ui/accessibility/ax_node_data.h
13 dictionary AXNodeData
{
17 // TODO(aboxhall): include location data;
18 object? boolAttributes
;
19 object? floatAttributes
;
20 object? htmlAttributes
;
21 object? intAttributes
;
22 object? intlistAttributes
;
23 object? stringAttributes
;
27 // Data for an accessibility event and/or an atomic change to an accessibility
28 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of
29 // the tree update format.
30 dictionary AXEventParams
{
31 // The process id of the renderer host.
34 // The routing id of the web contents that this update is for.
37 // The type of event that this update represents.
40 // A vector of nodes to update according to the rules described in
41 // ui/ax_tree_update.h.
45 // All possible actions that can be performed on automation nodes.
53 // Arguments required for all actions supplied to performAction.
54 dictionary PerformActionRequiredParams
{
57 long automationNodeID
;
58 ActionType actionType
;
61 // Arguments for the set_selection action supplied to performAction.
62 dictionary SetSelectionParams
{
67 // Returns the process id and routing id of the tab whose accessibility was
68 // enabled using enable().
69 callback EnableCallback
= void(long processID
, long routingID
);
72 // Enable automation of the active tab and retrieves its routing id for use
74 static
void enableCurrentTab
(EnableCallback
callback);
76 static
void performAction
(PerformActionRequiredParams args
,
81 // Fired when an accessibility event occurs
82 static
void onAccessibilityEvent
(AXEventParams update
);