Index: chrome/renderer/resources/extensions/automation/automation_node.js |
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js |
index 95924e762c4510540b4d842bbc2383f0a481d5bb..88d657b7f771133b7c90a5b35b307d9a6c44a5ad 100644 |
--- a/chrome/renderer/resources/extensions/automation/automation_node.js |
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js |
@@ -238,6 +238,14 @@ var GetHtmlAttribute = requireNative('automationInternal').GetHtmlAttribute; |
*/ |
var GetNameFrom = requireNative('automationInternal').GetNameFrom; |
+/** |
+ * @param {number} axTreeID The id of the accessibility tree. |
+ * @param {number} nodeID The id of a node. |
+ * @return {?Array.<automation.CustomAction>} List of custom actions of the |
+ * node. |
+ */ |
+var GetCustomActions = requireNative('automationInternal').GetCustomActions; |
+ |
var lastError = require('lastError'); |
var logging = requireNative('logging'); |
var utils = require('utils'); |
@@ -380,6 +388,10 @@ AutomationNodeImpl.prototype = { |
return GetNameFrom(this.treeID, this.id); |
}, |
+ get customActions() { |
+ return GetCustomActions(this.treeID, this.id); |
+ }, |
+ |
doDefault: function() { |
this.performAction_('doDefault'); |
}, |
@@ -407,6 +419,10 @@ AutomationNodeImpl.prototype = { |
this.performAction_('makeVisible'); |
}, |
+ performCustomAction: function(customActionId) { |
+ this.performAction_('customAction', { customActionID: customActionId }); |
+ }, |
+ |
resumeMedia: function() { |
this.performAction_('resumeMedia'); |
}, |
@@ -1107,6 +1123,7 @@ utils.expose(AutomationNode, AutomationNodeImpl, { |
'hitTest', |
'makeVisible', |
'matches', |
+ 'performCustomAction', |
'resumeMedia', |
'setSelection', |
'setSequentialFocusNavigationStartingPoint', |
@@ -1137,6 +1154,7 @@ utils.expose(AutomationNode, AutomationNodeImpl, { |
'root', |
'htmlAttributes', |
'nameFrom', |
+ 'customActions', |
]), |
}); |