Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/common/extensions/api/automation_internal.idl

Issue 1155183006: Reimplement automation API on top of C++-backed AXTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@automation_faster_2
Patch Set: Copy observers Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 {
10 long left;
11 long top;
12 long width;
13 long height;
14 };
15
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;
25
26 object? boolAttributes;
27 object? floatAttributes;
28 object? htmlAttributes;
29 object? intAttributes;
30 object? intlistAttributes;
31 object? stringAttributes;
32 long[] childIds;
33 };
34
35 dictionary AXTreeUpdate {
36 // ID of the node, if any, which should be invalidated before the new data
37 // is applied.
38 long nodeIdToClear;
39
40 // A vector of nodes to update according to the rules described in
41 // ui/accessibility/ax_tree_update.h.
42 AXNodeData[] nodes;
43 };
44
45 // Data for an accessibility event and/or an atomic change to an accessibility 9 // Data for an accessibility event and/or an atomic change to an accessibility
46 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of 10 // tree. See ui/accessibility/ax_tree_update.h for an extended explanation of
47 // the tree update format. 11 // the tree update format.
48 dictionary AXEventParams { 12 [nocompile] dictionary AXEventParams {
49 // The tree id of the web contents that this update is for. 13 // The tree id of the web contents that this update is for.
50 long treeID; 14 long treeID;
51 15
52 // ID of the node that the event applies to. 16 // ID of the node that the event applies to.
53 long targetID; 17 long targetID;
54 18
55 // The type of event that this update represents. 19 // The type of event that this update represents.
56 DOMString eventType; 20 DOMString eventType;
57
58 // Serialized changes to the tree structure and node data that should be
59 // applied before processing the event.
60 AXTreeUpdate update;
61 }; 21 };
62 22
63 // All possible actions that can be performed on automation nodes. 23 // All possible actions that can be performed on automation nodes.
64 enum ActionType { 24 enum ActionType {
65 focus, 25 focus,
66 doDefault, 26 doDefault,
67 makeVisible, 27 makeVisible,
68 setSelection, 28 setSelection,
69 showContextMenu 29 showContextMenu
70 }; 30 };
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Performs a query selector query. 86 // Performs a query selector query.
127 static void querySelector(QuerySelectorRequiredParams args, 87 static void querySelector(QuerySelectorRequiredParams args,
128 QuerySelectorCallback callback); 88 QuerySelectorCallback callback);
129 }; 89 };
130 90
131 interface Events { 91 interface Events {
132 // Fired when an accessibility event occurs 92 // Fired when an accessibility event occurs
133 static void onAccessibilityEvent(AXEventParams update); 93 static void onAccessibilityEvent(AXEventParams update);
134 94
135 static void onAccessibilityTreeDestroyed(long treeID); 95 static void onAccessibilityTreeDestroyed(long treeID);
96
97 static void onTreeChange(long treeID, long nodeID, DOMString changeType);
136 }; 98 };
137 }; 99 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/automation.idl ('k') | chrome/renderer/extensions/automation_internal_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698