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

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

Issue 2873373005: Add custom action support (Closed)
Patch Set: Fix a few files. Created 3 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/automation_node.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index a960f732872fc9bc5c729a4d81900cb8432991ea..6333faaef6128a5e4428aa568f0a6096c19ae156 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -238,6 +238,8 @@ var GetHtmlAttribute = requireNative('automationInternal').GetHtmlAttribute;
*/
var GetNameFrom = requireNative('automationInternal').GetNameFrom;
+var GetCustomActions = requireNative('automationInternal').GetCustomActions;
+
var lastError = require('lastError');
var logging = requireNative('logging');
var utils = require('utils');
@@ -380,6 +382,10 @@ AutomationNodeImpl.prototype = {
return GetNameFrom(this.treeID, this.id);
},
+ get customActions() {
+ return GetCustomActions(this.treeID, this.id);
+ },
+
doDefault: function() {
this.performAction_('doDefault');
},
@@ -407,6 +413,10 @@ AutomationNodeImpl.prototype = {
this.performAction_('makeVisible');
},
+ performCustomAction: function(customActionId) {
+ this.performAction_('customAction', { customActionID: customActionId });
+ },
+
resumeMedia: function() {
this.performAction_('resumeMedia');
},
@@ -1106,6 +1116,7 @@ utils.expose(AutomationNode, AutomationNodeImpl, {
'hitTest',
'makeVisible',
'matches',
+ 'performCustomAction',
'resumeMedia',
'setSelection',
'setSequentialFocusNavigationStartingPoint',
@@ -1136,6 +1147,7 @@ utils.expose(AutomationNode, AutomationNodeImpl, {
'root',
'htmlAttributes',
'nameFrom',
+ 'customActions',
]),
});

Powered by Google App Engine
This is Rietveld 408576698