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

Side by Side Diff: chrome/common/automation_events.h

Issue 10384023: Determine the element location and click synchronously on the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/automation_events.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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. Each script must result in exactly one
36 // JavaScript object. This object will be passed to the next script
37 // as arguments[0]. The only exceptions to this are the first script, which
38 // is passed null. The last script should result in a single JavaScript
39 // object with integer 'x' and 'y' properties.
40 // If empty, the coordinates in the normal mouse event are used.
41 std::vector<ScriptEvaluationRequest> location_script_chain;
42 };
43
44 #endif // CHROME_COMMON_AUTOMATION_EVENTS_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/automation_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698