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

Unified Diff: chrome/renderer/resources/extensions/automation_custom_bindings.js

Issue 308003003: Allow requesting Automation tree by tabId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary content script from tests Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/automation_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/automation_custom_bindings.js b/chrome/renderer/resources/extensions/automation_custom_bindings.js
index b63bf85c30871f797b77f79f8ad983e9d86031c0..b84d7b00a851cb31a7236afbb31e7062cc436c31 100644
--- a/chrome/renderer/resources/extensions/automation_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/automation_custom_bindings.js
@@ -32,15 +32,15 @@ automation.registerCustomHook(function(bindingsAPI) {
var apiFunctions = bindingsAPI.apiFunctions;
// TODO(aboxhall, dtseng): Make this return the speced AutomationRootNode obj.
- apiFunctions.setHandleRequest('getTree', function(callback) {
- // enableCurrentTab() ensures the renderer for the current tab has
+ apiFunctions.setHandleRequest('getTree', function getTree(tabId, callback) {
+ // enableTab() ensures the renderer for the active or specified tab has
// accessibility enabled, and fetches its process and routing ids to use as
- // a key in the idToAutomationTree map. The callback to enableCurrentTab is
+ // a key in the idToAutomationTree map. The callback to enableActiveTab is
// bound to the callback passed in to getTree(), so that once the tree is
// available (either due to having been cached earlier, or after an
// accessibility event occurs which causes the tree to be populated), the
// callback can be called.
- automationInternal.enableCurrentTab(function(pid, rid) {
+ automationInternal.enableTab(tabId, function onEnable(pid, rid) {
var id = createAutomationTreeID(pid, rid);
var targetTree = idToAutomationTree[id];
if (!targetTree) {

Powered by Google App Engine
This is Rietveld 408576698