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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 2873373005: Add custom action support (Closed)
Patch Set: Migrate to DataObjectBuilder. Created 3 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 side-by-side diff with in-line comments
Download patch
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 1e359f8222f5343d36795ce1915858241b28ebae..26cd00c591e16fb56a13fe84cf0cdabd11f6032c 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -266,6 +266,14 @@ var GetUnderline = requireNative('automationInternal').GetUnderline;
*/
var GetLineThrough = requireNative('automationInternal').GetLineThrough;
+/**
+ * @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');
@@ -424,6 +432,10 @@ AutomationNodeImpl.prototype = {
return GetLineThrough(this.treeID, this.id);
},
+ get customActions() {
+ return GetCustomActions(this.treeID, this.id);
+ },
+
doDefault: function() {
this.performAction_('doDefault');
},
@@ -451,6 +463,10 @@ AutomationNodeImpl.prototype = {
this.performAction_('makeVisible');
},
+ performCustomAction: function(customActionId) {
+ this.performAction_('customAction', { customActionID: customActionId });
+ },
+
resumeMedia: function() {
this.performAction_('resumeMedia');
},
@@ -1151,6 +1167,7 @@ utils.expose(AutomationNode, AutomationNodeImpl, {
'hitTest',
'makeVisible',
'matches',
+ 'performCustomAction',
'resumeMedia',
'setSelection',
'setSequentialFocusNavigationStartingPoint',
@@ -1185,6 +1202,7 @@ utils.expose(AutomationNode, AutomationNodeImpl, {
'italic',
'underline',
'lineThrough',
+ 'customActions',
]),
});
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.cc ('k') | components/arc/common/accessibility_helper.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698