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_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional | 940 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional |
941 // } | 941 // } |
942 void GoBack(base::DictionaryValue* args, IPC::Message* reply_message); | 942 void GoBack(base::DictionaryValue* args, IPC::Message* reply_message); |
943 | 943 |
944 // Reload the specified tab. Uses the JSON interface. | 944 // Reload the specified tab. Uses the JSON interface. |
945 // Example: | 945 // Example: |
946 // input: { "windex": 1, "tab_index": 1 } | 946 // input: { "windex": 1, "tab_index": 1 } |
947 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional } | 947 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional } |
948 void ReloadJSON(base::DictionaryValue* args, IPC::Message* reply_message); | 948 void ReloadJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
949 | 949 |
950 // Get the current url of the specified tab. Uses the JSON interface. | |
951 // Example: | |
952 // input: { "windex": 1, "tab_index": 1 } | |
953 // output: { "url": "http://www.google.com" } | |
954 void GetTabURLJSON(base::DictionaryValue* args, IPC::Message* reply_message); | |
955 | |
956 // Get the current url of the specified tab. Uses the JSON interface. | |
957 // Example: | |
958 // input: { "windex": 1, "tab_index": 1 } | |
959 // output: { "title": "Google" } | |
960 void GetTabTitleJSON(base::DictionaryValue* args, | |
961 IPC::Message* reply_message); | |
962 | |
963 // Captures the entire page of the the specified tab, including the | 950 // Captures the entire page of the the specified tab, including the |
964 // non-visible portions of the page, and saves the PNG to a file. | 951 // non-visible portions of the page, and saves the PNG to a file. |
965 // Example: | 952 // Example: |
966 // input: { "windex": 1, "tab_index": 1, "path":"/tmp/foo.png"} | 953 // input: { "windex": 1, "tab_index": 1, "path":"/tmp/foo.png"} |
967 // output: none | 954 // output: none |
968 void CaptureEntirePageJSON( | 955 void CaptureEntirePageJSON( |
969 base::DictionaryValue* args, IPC::Message* reply_message); | 956 base::DictionaryValue* args, IPC::Message* reply_message); |
970 | 957 |
971 // Gets the cookies for the given URL. Uses the JSON interface. | 958 // Gets the cookies for the given URL. Uses the JSON interface. |
972 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, | 959 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 // "secure": false, // optional | 1004 // "secure": false, // optional |
1018 // "expiry": 1401982012 // optional | 1005 // "expiry": 1401982012 // optional |
1019 // } | 1006 // } |
1020 // } | 1007 // } |
1021 // output: none | 1008 // output: none |
1022 void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message); | 1009 void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
1023 | 1010 |
1024 // Gets the ID for every open tab. This ID is unique per session. | 1011 // Gets the ID for every open tab. This ID is unique per session. |
1025 // Example: | 1012 // Example: |
1026 // input: none | 1013 // input: none |
1027 // output: { "ids": [4124, 213, 1] } | 1014 // output: { "ids": [213, 1] } |
1028 void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message); | 1015 void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message); |
1029 | 1016 |
| 1017 // Gets info about all open views. Each view ID is unique per session. |
| 1018 // Example: |
| 1019 // input: none |
| 1020 // output: { "views": [ |
| 1021 // { "type": 0, |
| 1022 // "view_id": "0|1902", |
| 1023 // "extension_id": "askjeoias3" // optional |
| 1024 // } |
| 1025 // ] |
| 1026 // } |
| 1027 void GetViews(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1028 |
1030 // Checks if the given tab ID refers to an open tab. | 1029 // Checks if the given tab ID refers to an open tab. |
1031 // Example: | 1030 // Example: |
1032 // input: { "id": 41 } | 1031 // input: { "id": 41 } |
1033 // output: { "is_valid": false } | 1032 // output: { "is_valid": false } |
1034 void IsTabIdValid(base::DictionaryValue* args, IPC::Message* reply_message); | 1033 void IsTabIdValid(base::DictionaryValue* args, IPC::Message* reply_message); |
1035 | 1034 |
| 1035 // Checks if the given view ID refers to an open view. |
| 1036 // Example: |
| 1037 // input: { "id": "0|1902" } |
| 1038 // output: { "is_valid": false } |
| 1039 void DoesViewExist(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1040 |
1036 // Closes the specified tab. | 1041 // Closes the specified tab. |
1037 // Example: | 1042 // Example: |
1038 // input: { "windex": 1, "tab_index": 1 } | 1043 // input: { "windex": 1, "tab_index": 1 } |
1039 // output: none | 1044 // output: none |
1040 void CloseTabJSON(base::DictionaryValue* args, IPC::Message* reply_message); | 1045 void CloseTabJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
1041 | 1046 |
1042 // Sends the WebKit events for a mouse click at a given coordinate. | 1047 // Sends the WebKit events for a mouse click at a given coordinate. |
1043 // Example: | 1048 // Example: |
1044 // input: { "windex": 1, | 1049 // input: { "windex": 1, |
1045 // "tab_index": 1, | 1050 // "tab_index": 1, |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1404 // Used to enumerate browser profiles. | 1409 // Used to enumerate browser profiles. |
1405 scoped_refptr<ImporterList> importer_list_; | 1410 scoped_refptr<ImporterList> importer_list_; |
1406 | 1411 |
1407 // The stored data for the ImportSettings operation. | 1412 // The stored data for the ImportSettings operation. |
1408 ImportSettingsData import_settings_data_; | 1413 ImportSettingsData import_settings_data_; |
1409 | 1414 |
1410 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1415 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1411 }; | 1416 }; |
1412 | 1417 |
1413 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1418 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |