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

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

Issue 655273005: Implement AutomationNode.querySelector(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Address review comments and flesh out error and edge case handling Created 6 years, 1 month 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 { 9 dictionary Rect {
10 long left; 10 long left;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 long automationNodeID; 78 long automationNodeID;
79 ActionType actionType; 79 ActionType actionType;
80 }; 80 };
81 81
82 // Arguments for the set_selection action supplied to performAction. 82 // Arguments for the set_selection action supplied to performAction.
83 dictionary SetSelectionParams { 83 dictionary SetSelectionParams {
84 long startIndex; 84 long startIndex;
85 long endIndex; 85 long endIndex;
86 }; 86 };
87 87
88 // Arguments for the querySelector function.
89 dictionary QuerySelectorRequiredParams {
90 long processID;
91 long routingID;
92 long automationNodeID;
93 DOMString selector;
94 };
95
88 // Returns the process id and routing id of the tab whose accessibility was 96 // Returns the process id and routing id of the tab whose accessibility was
89 // enabled using enable(). 97 // enabled using enable().
90 callback EnableTabCallback = void(long processID, long routingID); 98 callback EnableTabCallback = void(long processID, long routingID);
91 99
92 // Callback called when enableDesktop() returns. 100 // Callback called when enableDesktop() returns.
93 callback EnableDesktopCallback = void(); 101 callback EnableDesktopCallback = void();
94 102
103 // Callback called when querySelector() returns.
104 callback QuerySelectorCallback = void(long resultAutomationNodeID);
105
95 interface Functions { 106 interface Functions {
96 // Enable automation of the tab with the given id, or the active tab if no 107 // Enable automation of the tab with the given id, or the active tab if no
97 // tab id is given, and retrieves its process and routing ids for use in 108 // tab id is given, and retrieves its process and routing ids for use in
98 // future updates. 109 // future updates.
99 static void enableTab(optional long tabId, EnableTabCallback callback); 110 static void enableTab(optional long tabId, EnableTabCallback callback);
100 111
101 // Enables desktop automation. 112 // Enables desktop automation.
102 static void enableDesktop(EnableDesktopCallback callback); 113 static void enableDesktop(EnableDesktopCallback callback);
103 114
104 // Performs an action on an automation node. 115 // Performs an action on an automation node.
105 static void performAction(PerformActionRequiredParams args, 116 static void performAction(PerformActionRequiredParams args,
106 object opt_args); 117 object opt_args);
118
119 // Performs a query selector query.
120 static void querySelector(QuerySelectorRequiredParams args,
121 QuerySelectorCallback callback);
107 }; 122 };
108 123
109 interface Events { 124 interface Events {
110 // Fired when an accessibility event occurs 125 // Fired when an accessibility event occurs
111 static void onAccessibilityEvent(AXEventParams update); 126 static void onAccessibilityEvent(AXEventParams update);
112 127
113 static void onAccessibilityTreeDestroyed(long processID, long routingID); 128 static void onAccessibilityTreeDestroyed(long processID, long routingID);
114 }; 129 };
115 }; 130 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698