Chromium Code Reviews| 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 Value; | 19 class Value; |
| 19 | 20 |
| 20 struct WebKeyEvent { | 21 struct WebKeyEvent { |
| 21 WebKeyEvent(automation::KeyEventTypes type, | 22 WebKeyEvent(automation::KeyEventTypes type, |
| 22 ui::KeyboardCode key_code, | 23 ui::KeyboardCode key_code, |
| 23 const std::string& unmodified_text, | 24 const std::string& unmodified_text, |
| 24 const std::string& modified_text, | 25 const std::string& modified_text, |
| 25 int modifiers); | 26 int modifiers); |
| 26 | 27 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 int browser_index, | 92 int browser_index, |
| 92 int tab_index) WARN_UNUSED_RESULT; | 93 int tab_index) WARN_UNUSED_RESULT; |
| 93 | 94 |
| 94 // Requests the specified tab to reload. Waits for the load to complete. | 95 // Requests the specified tab to reload. Waits for the load to complete. |
| 95 // Returns true on success. | 96 // Returns true on success. |
| 96 bool SendReloadJSONRequest( | 97 bool SendReloadJSONRequest( |
| 97 AutomationMessageSender* sender, | 98 AutomationMessageSender* sender, |
| 98 int browser_index, | 99 int browser_index, |
| 99 int tab_index) WARN_UNUSED_RESULT; | 100 int tab_index) WARN_UNUSED_RESULT; |
| 100 | 101 |
| 102 // Requests a string containing the raw bytes of the entire tab view in | |
|
kkania
2011/03/22 21:08:56
Requests a snapshot of the entire page to be saved
Joe
2011/03/22 22:08:19
Done.
| |
| 103 // PNG format. Returns true on success. | |
| 104 bool SendCaptureEntirePageJSONRequest( | |
| 105 AutomationMessageSender* sender, | |
| 106 int browser_index, | |
| 107 int tab_index, | |
| 108 const FilePath& path) WARN_UNUSED_RESULT; | |
| 109 | |
| 101 // Requests the url of the specified tab. Returns true on success. | 110 // Requests the url of the specified tab. Returns true on success. |
| 102 bool SendGetTabURLJSONRequest( | 111 bool SendGetTabURLJSONRequest( |
| 103 AutomationMessageSender* sender, | 112 AutomationMessageSender* sender, |
| 104 int browser_index, | 113 int browser_index, |
| 105 int tab_index, | 114 int tab_index, |
| 106 std::string* url) WARN_UNUSED_RESULT; | 115 std::string* url) WARN_UNUSED_RESULT; |
| 107 | 116 |
| 108 // Requests the title of the specified tab. Returns true on success. | 117 // Requests the title of the specified tab. Returns true on success. |
| 109 bool SendGetTabTitleJSONRequest( | 118 bool SendGetTabTitleJSONRequest( |
| 110 AutomationMessageSender* sender, | 119 AutomationMessageSender* sender, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 AutomationMessageSender* sender, | 197 AutomationMessageSender* sender, |
| 189 int browser_index, | 198 int browser_index, |
| 190 int tab_index, | 199 int tab_index, |
| 191 const WebKeyEvent& key_event) WARN_UNUSED_RESULT; | 200 const WebKeyEvent& key_event) WARN_UNUSED_RESULT; |
| 192 | 201 |
| 193 // Requests to wait for all tabs to stop loading. Returns true on success. | 202 // Requests to wait for all tabs to stop loading. Returns true on success. |
| 194 bool SendWaitForAllTabsToStopLoadingJSONRequest( | 203 bool SendWaitForAllTabsToStopLoadingJSONRequest( |
| 195 AutomationMessageSender* sender) WARN_UNUSED_RESULT; | 204 AutomationMessageSender* sender) WARN_UNUSED_RESULT; |
| 196 | 205 |
| 197 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ | 206 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ |
| OLD | NEW |