| 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> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chrome/common/automation_constants.h" | 13 #include "chrome/common/automation_constants.h" |
| 14 #include "ui/base/keycodes/keyboard_codes.h" | 14 #include "ui/base/keycodes/keyboard_codes.h" |
| 15 | 15 |
| 16 class AutomationMessageSender; | 16 class AutomationMessageSender; |
| 17 class FilePath; |
| 17 class GURL; | 18 class GURL; |
| 18 class DictionaryValue; | 19 class DictionaryValue; |
| 19 class ListValue; | 20 class ListValue; |
| 20 class Value; | 21 class Value; |
| 21 | 22 |
| 22 struct WebKeyEvent { | 23 struct WebKeyEvent { |
| 23 WebKeyEvent(automation::KeyEventTypes type, | 24 WebKeyEvent(automation::KeyEventTypes type, |
| 24 ui::KeyboardCode key_code, | 25 ui::KeyboardCode key_code, |
| 25 const std::string& unmodified_text, | 26 const std::string& unmodified_text, |
| 26 const std::string& modified_text, | 27 const std::string& modified_text, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 int browser_index, | 94 int browser_index, |
| 94 int tab_index) WARN_UNUSED_RESULT; | 95 int tab_index) WARN_UNUSED_RESULT; |
| 95 | 96 |
| 96 // Requests the specified tab to reload. Waits for the load to complete. | 97 // Requests the specified tab to reload. Waits for the load to complete. |
| 97 // Returns true on success. | 98 // Returns true on success. |
| 98 bool SendReloadJSONRequest( | 99 bool SendReloadJSONRequest( |
| 99 AutomationMessageSender* sender, | 100 AutomationMessageSender* sender, |
| 100 int browser_index, | 101 int browser_index, |
| 101 int tab_index) WARN_UNUSED_RESULT; | 102 int tab_index) WARN_UNUSED_RESULT; |
| 102 | 103 |
| 104 // Requests a snapshot of the entire page to be saved to the given path |
| 105 // in PNG format. |
| 106 // Returns true on success. |
| 107 bool SendCaptureEntirePageJSONRequest( |
| 108 AutomationMessageSender* sender, |
| 109 int browser_index, |
| 110 int tab_index, |
| 111 const FilePath& path) WARN_UNUSED_RESULT; |
| 112 |
| 103 // Requests the url of the specified tab. Returns true on success. | 113 // Requests the url of the specified tab. Returns true on success. |
| 104 bool SendGetTabURLJSONRequest( | 114 bool SendGetTabURLJSONRequest( |
| 105 AutomationMessageSender* sender, | 115 AutomationMessageSender* sender, |
| 106 int browser_index, | 116 int browser_index, |
| 107 int tab_index, | 117 int tab_index, |
| 108 std::string* url) WARN_UNUSED_RESULT; | 118 std::string* url) WARN_UNUSED_RESULT; |
| 109 | 119 |
| 110 // Requests the title of the specified tab. Returns true on success. | 120 // Requests the title of the specified tab. Returns true on success. |
| 111 bool SendGetTabTitleJSONRequest( | 121 bool SendGetTabTitleJSONRequest( |
| 112 AutomationMessageSender* sender, | 122 AutomationMessageSender* sender, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 AutomationMessageSender* sender, | 228 AutomationMessageSender* sender, |
| 219 int browser_index, | 229 int browser_index, |
| 220 int tab_index, | 230 int tab_index, |
| 221 const WebKeyEvent& key_event) WARN_UNUSED_RESULT; | 231 const WebKeyEvent& key_event) WARN_UNUSED_RESULT; |
| 222 | 232 |
| 223 // Requests to wait for all tabs to stop loading. Returns true on success. | 233 // Requests to wait for all tabs to stop loading. Returns true on success. |
| 224 bool SendWaitForAllTabsToStopLoadingJSONRequest( | 234 bool SendWaitForAllTabsToStopLoadingJSONRequest( |
| 225 AutomationMessageSender* sender) WARN_UNUSED_RESULT; | 235 AutomationMessageSender* sender) WARN_UNUSED_RESULT; |
| 226 | 236 |
| 227 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ | 237 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ |
| OLD | NEW |