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

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

Issue 2486273002: Send mouse location as part of automation events. (Closed)
Patch Set: Fix Created 4 years, 1 month 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
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 94b2f6c0413c145029cfa88d93b6395b4e351b7b..489f02f653b89ab8507b3df01a161a78c9ef9608 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -427,7 +427,7 @@ AutomationNodeImpl.prototype = {
attributes: this.attributes };
},
- dispatchEvent: function(eventType, eventFrom) {
+ dispatchEvent: function(eventType, eventFrom, mouseX, mouseY) {
var path = [];
var parent = this.parent;
while (parent) {
@@ -435,6 +435,8 @@ AutomationNodeImpl.prototype = {
parent = parent.parent;
}
var event = new AutomationEvent(eventType, this.wrapper, eventFrom);
+ event.mouseX = mouseX;
+ event.mouseY = mouseY;
// Dispatch the event through the propagation path in three phases:
// - capturing: starting from the root and going down to the target's parent
@@ -997,7 +999,8 @@ AutomationRootNodeImpl.prototype = {
if (targetNode) {
var targetNodeImpl = privates(targetNode).impl;
targetNodeImpl.dispatchEvent(
- eventParams.eventType, eventParams.eventFrom);
+ eventParams.eventType, eventParams.eventFrom,
+ eventParams.mouseX, eventParams.mouseY);
} else {
logging.WARNING('Got ' + eventParams.eventType +
' event on unknown node: ' + eventParams.targetID +
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698