OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_TEST_CHROMEDRIVER_ELEMENT_COMMANDS_H_ | 5 #ifndef CHROME_TEST_CHROMEDRIVER_ELEMENT_COMMANDS_H_ |
6 #define CHROME_TEST_CHROMEDRIVER_ELEMENT_COMMANDS_H_ | 6 #define CHROME_TEST_CHROMEDRIVER_ELEMENT_COMMANDS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class DictionaryValue; | 14 class DictionaryValue; |
15 class Value; | 15 class Value; |
16 } | 16 } |
17 | 17 |
18 struct Session; | 18 struct Session; |
19 class Status; | 19 class Status; |
| 20 class Timeout; |
20 class WebView; | 21 class WebView; |
21 | 22 |
22 typedef base::Callback<Status(Session* session, | 23 typedef base::Callback<Status(Session* session, |
23 WebView* web_view, | 24 WebView* web_view, |
24 const std::string&, | 25 const std::string&, |
25 const base::DictionaryValue&, | 26 const base::DictionaryValue&, |
26 std::unique_ptr<base::Value>*)> | 27 std::unique_ptr<base::Value>*)> |
27 ElementCommand; | 28 ElementCommand; |
28 | 29 |
29 // Execute a command on a specific element. | 30 // Execute a command on a specific element. |
30 Status ExecuteElementCommand(const ElementCommand& command, | 31 Status ExecuteElementCommand( |
31 Session* session, | 32 const ElementCommand& command, |
32 WebView* web_view, | 33 Session* session, |
33 const base::DictionaryValue& params, | 34 WebView* web_view, |
34 std::unique_ptr<base::Value>* value); | 35 const base::DictionaryValue& params, |
| 36 std::unique_ptr<base::Value>* value, |
| 37 Timeout* timeout); |
35 | 38 |
36 // Search for an element on the page, starting from the given element. | 39 // Search for an element on the page, starting from the given element. |
37 Status ExecuteFindChildElement(int interval_ms, | 40 Status ExecuteFindChildElement(int interval_ms, |
38 Session* session, | 41 Session* session, |
39 WebView* web_view, | 42 WebView* web_view, |
40 const std::string& element_id, | 43 const std::string& element_id, |
41 const base::DictionaryValue& params, | 44 const base::DictionaryValue& params, |
42 std::unique_ptr<base::Value>* value); | 45 std::unique_ptr<base::Value>* value); |
43 | 46 |
44 // Search for multiple elements on the page, starting from the given element. | 47 // Search for multiple elements on the page, starting from the given element. |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 std::unique_ptr<base::Value>* value); | 190 std::unique_ptr<base::Value>* value); |
188 | 191 |
189 // Returns whether the two given elements are equivalent. | 192 // Returns whether the two given elements are equivalent. |
190 Status ExecuteElementEquals(Session* session, | 193 Status ExecuteElementEquals(Session* session, |
191 WebView* web_view, | 194 WebView* web_view, |
192 const std::string& element_id, | 195 const std::string& element_id, |
193 const base::DictionaryValue& params, | 196 const base::DictionaryValue& params, |
194 std::unique_ptr<base::Value>* value); | 197 std::unique_ptr<base::Value>* value); |
195 | 198 |
196 #endif // CHROME_TEST_CHROMEDRIVER_ELEMENT_COMMANDS_H_ | 199 #endif // CHROME_TEST_CHROMEDRIVER_ELEMENT_COMMANDS_H_ |
OLD | NEW |