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_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ |
6 #define CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ | 6 #define CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 22 matching lines...) Expand all Loading... |
33 std::string modified_text; | 33 std::string modified_text; |
34 int modifiers; | 34 int modifiers; |
35 }; | 35 }; |
36 | 36 |
37 // Sends a JSON request to the chrome automation provider. Returns true | 37 // Sends a JSON request to the chrome automation provider. Returns true |
38 // if the JSON request was successfully sent and the reply was received. | 38 // if the JSON request was successfully sent and the reply was received. |
39 // If true, |success| will be set to whether the JSON request was | 39 // If true, |success| will be set to whether the JSON request was |
40 // completed successfully by the automation provider. | 40 // completed successfully by the automation provider. |
41 bool SendAutomationJSONRequest(AutomationMessageSender* sender, | 41 bool SendAutomationJSONRequest(AutomationMessageSender* sender, |
42 const std::string& request, | 42 const std::string& request, |
| 43 int timeout_ms, |
43 std::string* reply, | 44 std::string* reply, |
44 bool* success) WARN_UNUSED_RESULT; | 45 bool* success) WARN_UNUSED_RESULT; |
45 | 46 |
46 // Requests the current browser and tab indices for the given tab ID. | 47 // Requests the current browser and tab indices for the given tab ID. |
47 // Returns true on success. | 48 // Returns true on success. |
48 bool SendGetIndicesFromTabIdJSONRequest( | 49 bool SendGetIndicesFromTabIdJSONRequest( |
49 AutomationMessageSender* sender, | 50 AutomationMessageSender* sender, |
50 int tab_id, | 51 int tab_id, |
51 int* browser_index, | 52 int* browser_index, |
52 int* tab_index) WARN_UNUSED_RESULT; | 53 int* tab_index) WARN_UNUSED_RESULT; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 int browser_index, | 238 int browser_index, |
238 int tab_index, | 239 int tab_index, |
239 ui::KeyboardCode key_code, | 240 ui::KeyboardCode key_code, |
240 int modifiers) WARN_UNUSED_RESULT; | 241 int modifiers) WARN_UNUSED_RESULT; |
241 | 242 |
242 // Requests to wait for all tabs to stop loading. Returns true on success. | 243 // Requests to wait for all tabs to stop loading. Returns true on success. |
243 bool SendWaitForAllTabsToStopLoadingJSONRequest( | 244 bool SendWaitForAllTabsToStopLoadingJSONRequest( |
244 AutomationMessageSender* sender) WARN_UNUSED_RESULT; | 245 AutomationMessageSender* sender) WARN_UNUSED_RESULT; |
245 | 246 |
246 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ | 247 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ |
OLD | NEW |