OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBDRIVER_COMMANDS_SET_TIMEOUT_COMMANDS_H_ | 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_SET_TIMEOUT_COMMANDS_H_ |
6 #define CHROME_TEST_WEBDRIVER_COMMANDS_SET_TIMEOUT_COMMANDS_H_ | 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_SET_TIMEOUT_COMMANDS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chrome/test/webdriver/commands/webdriver_command.h" | 11 #include "chrome/test/webdriver/commands/webdriver_command.h" |
12 | 12 |
| 13 namespace base { |
13 class DictionaryValue; | 14 class DictionaryValue; |
| 15 } |
14 | 16 |
15 namespace webdriver { | 17 namespace webdriver { |
16 | 18 |
17 class Response; | 19 class Response; |
18 | 20 |
19 class SetTimeoutCommand : public WebDriverCommand { | 21 class SetTimeoutCommand : public WebDriverCommand { |
20 public: | 22 public: |
21 SetTimeoutCommand(const std::vector<std::string>& path_segments, | 23 SetTimeoutCommand(const std::vector<std::string>& path_segments, |
22 const DictionaryValue* const parameters); | 24 const base::DictionaryValue* const parameters); |
23 virtual ~SetTimeoutCommand(); | 25 virtual ~SetTimeoutCommand(); |
24 | 26 |
25 virtual bool DoesPost(); | 27 virtual bool DoesPost(); |
26 virtual void ExecutePost(Response* const response); | 28 virtual void ExecutePost(Response* const response); |
27 virtual void SetTimeout(int timeout_ms) = 0; | 29 virtual void SetTimeout(int timeout_ms) = 0; |
28 | 30 |
29 private: | 31 private: |
30 DISALLOW_COPY_AND_ASSIGN(SetTimeoutCommand); | 32 DISALLOW_COPY_AND_ASSIGN(SetTimeoutCommand); |
31 }; | 33 }; |
32 | 34 |
33 // Set timeout for asynchronous script execution (/session/*/execute_async). | 35 // Set timeout for asynchronous script execution (/session/*/execute_async). |
34 class SetAsyncScriptTimeoutCommand : public SetTimeoutCommand { | 36 class SetAsyncScriptTimeoutCommand : public SetTimeoutCommand { |
35 public: | 37 public: |
36 SetAsyncScriptTimeoutCommand(const std::vector<std::string>& path_segments, | 38 SetAsyncScriptTimeoutCommand(const std::vector<std::string>& path_segments, |
37 const DictionaryValue* const parameters); | 39 const base::DictionaryValue* const parameters); |
38 virtual ~SetAsyncScriptTimeoutCommand(); | 40 virtual ~SetAsyncScriptTimeoutCommand(); |
39 virtual void SetTimeout(int timeout_ms); | 41 virtual void SetTimeout(int timeout_ms); |
40 | 42 |
41 private: | 43 private: |
42 DISALLOW_COPY_AND_ASSIGN(SetAsyncScriptTimeoutCommand); | 44 DISALLOW_COPY_AND_ASSIGN(SetAsyncScriptTimeoutCommand); |
43 }; | 45 }; |
44 | 46 |
45 // Set the amount of time the driver should wait when searching for elements. | 47 // Set the amount of time the driver should wait when searching for elements. |
46 class ImplicitWaitCommand : public SetTimeoutCommand { | 48 class ImplicitWaitCommand : public SetTimeoutCommand { |
47 public: | 49 public: |
48 ImplicitWaitCommand(const std::vector<std::string>& path_segments, | 50 ImplicitWaitCommand(const std::vector<std::string>& path_segments, |
49 const DictionaryValue* const parameters); | 51 const base::DictionaryValue* const parameters); |
50 virtual ~ImplicitWaitCommand(); | 52 virtual ~ImplicitWaitCommand(); |
51 virtual void SetTimeout(int timeout_ms); | 53 virtual void SetTimeout(int timeout_ms); |
52 | 54 |
53 private: | 55 private: |
54 DISALLOW_COPY_AND_ASSIGN(ImplicitWaitCommand); | 56 DISALLOW_COPY_AND_ASSIGN(ImplicitWaitCommand); |
55 }; | 57 }; |
56 | 58 |
57 } // namespace webdriver | 59 } // namespace webdriver |
58 | 60 |
59 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_SET_TIMEOUT_COMMANDS_H_ | 61 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_SET_TIMEOUT_COMMANDS_H_ |
60 | |
OLD | NEW |