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

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: rebase 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 9994bf50e7b858a554e700ef905d41b5250c4a50..96e9e8d4175e58c810d1edd7cbde3f6fdc967f8a 100644
--- a/chrome/renderer/resources/extensions/automation_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/automation_custom_bindings.js
@@ -35,15 +35,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) {
if (lastError.hasError(chrome)) {
callback();
return;

Powered by Google App Engine
This is Rietveld 408576698