| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
| 14 #include "chrome/common/automation_constants.h" | 14 #include "chrome/common/automation_constants.h" |
| 15 #include "chrome/common/automation_id.h" | 15 #include "chrome/common/automation_id.h" |
| 16 #include "ui/base/keycodes/keyboard_codes.h" | 16 #include "ui/base/keycodes/keyboard_codes.h" |
| 17 | 17 |
| 18 class AutomationMessageSender; | 18 class AutomationMessageSender; |
| 19 class FilePath; | |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 class DictionaryValue; | 21 class DictionaryValue; |
| 22 class FilePath; |
| 23 class ListValue; | 23 class ListValue; |
| 24 class Value; | 24 class Value; |
| 25 } | 25 } |
| 26 | 26 |
| 27 struct WebKeyEvent { | 27 struct WebKeyEvent { |
| 28 WebKeyEvent(automation::KeyEventTypes type, | 28 WebKeyEvent(automation::KeyEventTypes type, |
| 29 ui::KeyboardCode key_code, | 29 ui::KeyboardCode key_code, |
| 30 const std::string& unmodified_text, | 30 const std::string& unmodified_text, |
| 31 const std::string& modified_text, | 31 const std::string& modified_text, |
| 32 int modifiers); | 32 int modifiers); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 AutomationMessageSender* sender, | 237 AutomationMessageSender* sender, |
| 238 const WebViewLocator& locator, | 238 const WebViewLocator& locator, |
| 239 automation::Error* error) WARN_UNUSED_RESULT; | 239 automation::Error* error) WARN_UNUSED_RESULT; |
| 240 | 240 |
| 241 // Requests a snapshot of the entire page to be saved to the given path | 241 // Requests a snapshot of the entire page to be saved to the given path |
| 242 // in PNG format. | 242 // in PNG format. |
| 243 // Returns true on success. | 243 // Returns true on success. |
| 244 bool SendCaptureEntirePageJSONRequest( | 244 bool SendCaptureEntirePageJSONRequest( |
| 245 AutomationMessageSender* sender, | 245 AutomationMessageSender* sender, |
| 246 const WebViewLocator& locator, | 246 const WebViewLocator& locator, |
| 247 const FilePath& path, | 247 const base::FilePath& path, |
| 248 automation::Error* error) WARN_UNUSED_RESULT; | 248 automation::Error* error) WARN_UNUSED_RESULT; |
| 249 | 249 |
| 250 #if !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) | 250 #if !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS)) |
| 251 // Requests a heap profile dump. | 251 // Requests a heap profile dump. |
| 252 // Returns true on success. | 252 // Returns true on success. |
| 253 bool SendHeapProfilerDumpJSONRequest( | 253 bool SendHeapProfilerDumpJSONRequest( |
| 254 AutomationMessageSender* sender, | 254 AutomationMessageSender* sender, |
| 255 const WebViewLocator& locator, | 255 const WebViewLocator& locator, |
| 256 const std::string& reason, | 256 const std::string& reason, |
| 257 automation::Error* error) WARN_UNUSED_RESULT; | 257 automation::Error* error) WARN_UNUSED_RESULT; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 const WebMouseEvent& mouse_event, | 403 const WebMouseEvent& mouse_event, |
| 404 automation::Error* error) WARN_UNUSED_RESULT; | 404 automation::Error* error) WARN_UNUSED_RESULT; |
| 405 | 405 |
| 406 // Requests to drag and drop the file paths at the given coordinate in the | 406 // Requests to drag and drop the file paths at the given coordinate in the |
| 407 // specified view. Returns true on success. | 407 // specified view. Returns true on success. |
| 408 bool SendDragAndDropFilePathsJSONRequest( | 408 bool SendDragAndDropFilePathsJSONRequest( |
| 409 AutomationMessageSender* sender, | 409 AutomationMessageSender* sender, |
| 410 const WebViewLocator& locator, | 410 const WebViewLocator& locator, |
| 411 int x, | 411 int x, |
| 412 int y, | 412 int y, |
| 413 const std::vector<FilePath::StringType>& paths, | 413 const std::vector<base::FilePath::StringType>& paths, |
| 414 automation::Error* error) WARN_UNUSED_RESULT; | 414 automation::Error* error) WARN_UNUSED_RESULT; |
| 415 | 415 |
| 416 // Requests to set the given view's bounds. Returns true on success. | 416 // Requests to set the given view's bounds. Returns true on success. |
| 417 bool SendSetViewBoundsJSONRequest( | 417 bool SendSetViewBoundsJSONRequest( |
| 418 AutomationMessageSender* sender, | 418 AutomationMessageSender* sender, |
| 419 const WebViewId& id, | 419 const WebViewId& id, |
| 420 int x, | 420 int x, |
| 421 int y, | 421 int y, |
| 422 int width, | 422 int width, |
| 423 int height, | 423 int height, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 // server. Returns true on success. | 459 // server. Returns true on success. |
| 460 bool SendGetChromeDriverAutomationVersion( | 460 bool SendGetChromeDriverAutomationVersion( |
| 461 AutomationMessageSender* sender, | 461 AutomationMessageSender* sender, |
| 462 int* version, | 462 int* version, |
| 463 automation::Error* error) WARN_UNUSED_RESULT; | 463 automation::Error* error) WARN_UNUSED_RESULT; |
| 464 | 464 |
| 465 // Requests that the given extension be installed. If |with_ui| is false, | 465 // Requests that the given extension be installed. If |with_ui| is false, |
| 466 // the extension will be installed silently. Returns true on success. | 466 // the extension will be installed silently. Returns true on success. |
| 467 bool SendInstallExtensionJSONRequest( | 467 bool SendInstallExtensionJSONRequest( |
| 468 AutomationMessageSender* sender, | 468 AutomationMessageSender* sender, |
| 469 const FilePath& path, | 469 const base::FilePath& path, |
| 470 bool with_ui, | 470 bool with_ui, |
| 471 std::string* extension_id, | 471 std::string* extension_id, |
| 472 automation::Error* error) WARN_UNUSED_RESULT; | 472 automation::Error* error) WARN_UNUSED_RESULT; |
| 473 | 473 |
| 474 // Requests info about all installed extensions. Returns true on success. | 474 // Requests info about all installed extensions. Returns true on success. |
| 475 bool SendGetExtensionsInfoJSONRequest( | 475 bool SendGetExtensionsInfoJSONRequest( |
| 476 AutomationMessageSender* sender, | 476 AutomationMessageSender* sender, |
| 477 base::ListValue* extensions_list, | 477 base::ListValue* extensions_list, |
| 478 automation::Error* error) WARN_UNUSED_RESULT; | 478 automation::Error* error) WARN_UNUSED_RESULT; |
| 479 | 479 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 base::Value* value, | 525 base::Value* value, |
| 526 automation::Error* error) WARN_UNUSED_RESULT; | 526 automation::Error* error) WARN_UNUSED_RESULT; |
| 527 | 527 |
| 528 // Requests to override the user's geolocation. Returns true on success. | 528 // Requests to override the user's geolocation. Returns true on success. |
| 529 bool SendOverrideGeolocationJSONRequest( | 529 bool SendOverrideGeolocationJSONRequest( |
| 530 AutomationMessageSender* sender, | 530 AutomationMessageSender* sender, |
| 531 const base::DictionaryValue* geolocation, | 531 const base::DictionaryValue* geolocation, |
| 532 automation::Error* error) WARN_UNUSED_RESULT; | 532 automation::Error* error) WARN_UNUSED_RESULT; |
| 533 | 533 |
| 534 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ | 534 #endif // CHROME_TEST_AUTOMATION_AUTOMATION_JSON_REQUESTS_H_ |
| OLD | NEW |