Index: chrome/common/automation_events.h |
diff --git a/chrome/common/automation_events.h b/chrome/common/automation_events.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6aae4c46f0f4f5025f295ff34c6f520cce9ad0b6 |
--- /dev/null |
+++ b/chrome/common/automation_events.h |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_COMMON_AUTOMATION_EVENTS_H_ |
+#define CHROME_COMMON_AUTOMATION_EVENTS_H_ |
+#pragma once |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
+ |
+// A request to evaluate a script in a given frame. |
+struct ScriptEvaluationRequest { |
+ ScriptEvaluationRequest(); |
+ ScriptEvaluationRequest(const std::string& script, |
+ const std::string& frame_xpath); |
+ ~ScriptEvaluationRequest(); |
+ |
+ std::string script; |
+ std::string frame_xpath; |
+}; |
+ |
+// An extension to a normal mouse event that includes data for determining the |
+// location of the mouse event. |
+struct AutomationMouseEvent { |
+ AutomationMouseEvent(); |
+ ~AutomationMouseEvent(); |
+ |
+ WebKit::WebMouseEvent mouse_event; |
+ |
+ // A list of scripts that when evaluated returns a coordinate for the event. |
+ // The scripts are chained together in that the output for one script |
+ // provides the input for the next. |
dennis_jeffrey
2012/05/08 19:18:49
Would it be helpful to show an example of how a si
kkania
2012/05/09 18:19:59
Done.
|
+ // If empty, the coordinates in the normal mouse event are used. |
+ std::vector<ScriptEvaluationRequest> location_script_chain; |
+}; |
+ |
+#endif // CHROME_COMMON_AUTOMATION_EVENTS_H_ |