Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_AUTOMATION_EVENTS_H_ | |
| 6 #define CHROME_COMMON_AUTOMATION_EVENTS_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 #include <vector> | |
| 11 | |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | |
| 13 | |
| 14 // A request to evaluate a script in a given frame. | |
| 15 struct ScriptEvaluationRequest { | |
| 16 ScriptEvaluationRequest(); | |
| 17 ScriptEvaluationRequest(const std::string& script, | |
| 18 const std::string& frame_xpath); | |
| 19 ~ScriptEvaluationRequest(); | |
| 20 | |
| 21 std::string script; | |
| 22 std::string frame_xpath; | |
| 23 }; | |
| 24 | |
| 25 // An extension to a normal mouse event that includes data for determining the | |
| 26 // location of the mouse event. | |
| 27 struct AutomationMouseEvent { | |
| 28 AutomationMouseEvent(); | |
| 29 ~AutomationMouseEvent(); | |
| 30 | |
| 31 WebKit::WebMouseEvent mouse_event; | |
| 32 | |
| 33 // A list of scripts that when evaluated returns a coordinate for the event. | |
| 34 // The scripts are chained together in that the output for one script | |
| 35 // 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.
| |
| 36 // If empty, the coordinates in the normal mouse event are used. | |
| 37 std::vector<ScriptEvaluationRequest> location_script_chain; | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_COMMON_AUTOMATION_EVENTS_H_ | |
| OLD | NEW |