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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 void InstallExtension(base::DictionaryValue* args, | 639 void InstallExtension(base::DictionaryValue* args, |
640 IPC::Message* reply_message); | 640 IPC::Message* reply_message); |
641 | 641 |
642 // Get info about all intalled extensions. | 642 // Get info about all intalled extensions. |
643 // Uses the JSON interface for input/output. | 643 // Uses the JSON interface for input/output. |
644 void GetExtensionsInfo(base::DictionaryValue* args, | 644 void GetExtensionsInfo(base::DictionaryValue* args, |
645 IPC::Message* reply_message); | 645 IPC::Message* reply_message); |
646 | 646 |
647 // Uninstalls the extension with the given id. | 647 // Uninstalls the extension with the given id. |
648 // Uses the JSON interface for input/output. | 648 // Uses the JSON interface for input/output. |
649 void UninstallExtensionById(Browser* browser, | 649 void UninstallExtensionById(base::DictionaryValue* args, |
650 base::DictionaryValue* args, | |
651 IPC::Message* reply_message); | 650 IPC::Message* reply_message); |
652 | 651 |
653 // Set extension states: | 652 // Set extension states: |
654 // Enable/disable extension. | 653 // Enable/disable extension. |
655 // Allow/disallow extension in incognito mode. | 654 // Allow/disallow extension in incognito mode. |
656 // Uses the JSON interface for input/output. | 655 // Uses the JSON interface for input/output. |
657 void SetExtensionStateById(Browser* browser, | 656 void SetExtensionStateById(base::DictionaryValue* args, |
658 base::DictionaryValue* args, | |
659 IPC::Message* reply_message); | 657 IPC::Message* reply_message); |
660 | 658 |
661 // Trigger page action asynchronously in the active tab. | 659 // Trigger page action asynchronously in the active tab. |
662 // Uses the JSON interface for input/output. | 660 // Uses the JSON interface for input/output. |
663 void TriggerPageActionById(base::DictionaryValue* args, | 661 void TriggerPageActionById(base::DictionaryValue* args, |
664 IPC::Message* reply_message); | 662 IPC::Message* reply_message); |
665 | 663 |
666 // Trigger browser action asynchronously in the active tab. | 664 // Trigger browser action asynchronously in the active tab. |
667 // Uses the JSON interface for input/output. | 665 // Uses the JSON interface for input/output. |
668 void TriggerBrowserActionById(base::DictionaryValue* args, | 666 void TriggerBrowserActionById(base::DictionaryValue* args, |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 // the handle number assigned by the automation system. | 881 // the handle number assigned by the automation system. |
884 // Example: | 882 // Example: |
885 // input: { "tab_id": 1, // optional | 883 // input: { "tab_id": 1, // optional |
886 // "tab_handle": 3 // optional | 884 // "tab_handle": 3 // optional |
887 // } | 885 // } |
888 // output: { "windex": 1, "tab_index": 5 } | 886 // output: { "windex": 1, "tab_index": 5 } |
889 void GetIndicesFromTab(base::DictionaryValue* args, | 887 void GetIndicesFromTab(base::DictionaryValue* args, |
890 IPC::Message* reply_message); | 888 IPC::Message* reply_message); |
891 | 889 |
892 // Navigates to the given URL. Uses the JSON interface. | 890 // Navigates to the given URL. Uses the JSON interface. |
| 891 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 892 // to specify the tab. |
893 // Example: | 893 // Example: |
894 // input: { "windex": 1, | 894 // input: { "windex": 1, |
895 // "tab_index": 3, | 895 // "tab_index": 3, |
| 896 // "tab_id": { "type": 0, "id": "awoein" }, |
896 // "url": "http://www.google.com", | 897 // "url": "http://www.google.com", |
897 // "navigation_count": 1 // number of navigations to wait for | 898 // "navigation_count": 1 // number of navigations to wait for |
898 // } | 899 // } |
899 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } | 900 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS } |
900 void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message); | 901 void NavigateToURL(base::DictionaryValue* args, IPC::Message* reply_message); |
901 | 902 |
902 // Executes javascript in the specified frame. Uses the JSON interface. | 903 // Executes javascript in the specified frame. Uses the JSON interface. |
903 // Waits for a result from the |DOMAutomationController|. The javascript | 904 // Waits for a result from the |DOMAutomationController|. The javascript |
904 // must send a string. | 905 // must send a string. |
| 906 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 907 // to specify the tab. |
905 // Example: | 908 // Example: |
906 // input: { "windex": 1, | 909 // input: { "windex": 1, |
907 // "tab_index": 1, | 910 // "tab_index": 1, |
| 911 // "tab_id": { "type": 0, "id": "awoein" }, |
908 // "frame_xpath": "//frames[1]", | 912 // "frame_xpath": "//frames[1]", |
909 // "javascript": | 913 // "javascript": |
910 // "window.domAutomationController.send(window.name)", | 914 // "window.domAutomationController.send(window.name)", |
911 // } | 915 // } |
912 // output: { "result": "My Window Name" } | 916 // output: { "result": "My Window Name" } |
913 // This and some following methods have a suffix of JSON to distingush them | 917 // This and some following methods have a suffix of JSON to distingush them |
914 // from already existing methods which perform the same function, but use | 918 // from already existing methods which perform the same function, but use |
915 // custom IPC messages instead of the JSON IPC message. These functions will | 919 // custom IPC messages instead of the JSON IPC message. These functions will |
916 // eventually be replaced with the JSON ones and the JSON suffix will be | 920 // eventually be replaced with the JSON ones and the JSON suffix will be |
917 // dropped. | 921 // dropped. |
(...skipping 11 matching lines...) Expand all Loading... |
929 // } | 933 // } |
930 // "frame_xpath": "//frames[1]", | 934 // "frame_xpath": "//frames[1]", |
931 // "javascript": | 935 // "javascript": |
932 // "window.domAutomationController.send(window.name)", | 936 // "window.domAutomationController.send(window.name)", |
933 // } | 937 // } |
934 // output: { "result": "My Window Name" } | 938 // output: { "result": "My Window Name" } |
935 void ExecuteJavascriptInRenderView( | 939 void ExecuteJavascriptInRenderView( |
936 base::DictionaryValue* args, IPC::Message* reply_message); | 940 base::DictionaryValue* args, IPC::Message* reply_message); |
937 | 941 |
938 // Goes forward in the specified tab. Uses the JSON interface. | 942 // Goes forward in the specified tab. Uses the JSON interface. |
| 943 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 944 // to specify the tab. |
939 // Example: | 945 // Example: |
940 // input: { "windex": 1, "tab_index": 1 } | 946 // input: { "windex": 1, |
| 947 // "tab_index": 1, |
| 948 // "tab_id": { "type": 0, "id": "awoein" } |
| 949 // } |
941 // output: { "did_go_forward": true, // optional | 950 // output: { "did_go_forward": true, // optional |
942 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional | 951 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional |
943 // } | 952 // } |
944 void GoForward(base::DictionaryValue* args, IPC::Message* reply_message); | 953 void GoForward(base::DictionaryValue* args, IPC::Message* reply_message); |
945 | 954 |
946 // Goes back in the specified tab. Uses the JSON interface. | 955 // Goes back in the specified tab. Uses the JSON interface. |
| 956 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 957 // to specify the tab. |
947 // Example: | 958 // Example: |
948 // input: { "windex": 1, "tab_index": 1 } | 959 // input: { "windex": 1, |
| 960 // "tab_index": 1, |
| 961 // "tab_id": { "type": 0, "id": "awoein" } |
| 962 // } |
949 // output: { "did_go_back": true, // optional | 963 // output: { "did_go_back": true, // optional |
950 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional | 964 // "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional |
951 // } | 965 // } |
952 void GoBack(base::DictionaryValue* args, IPC::Message* reply_message); | 966 void GoBack(base::DictionaryValue* args, IPC::Message* reply_message); |
953 | 967 |
954 // Reload the specified tab. Uses the JSON interface. | 968 // Reload the specified tab. Uses the JSON interface. |
| 969 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 970 // to specify the tab. |
955 // Example: | 971 // Example: |
956 // input: { "windex": 1, "tab_index": 1 } | 972 // input: { "windex": 1, |
| 973 // "tab_index": 1, |
| 974 // "tab_id": { "type": 0, "id": "awoein" } |
| 975 // } |
957 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional } | 976 // output: { "result": AUTOMATION_MSG_NAVIGATION_SUCCESS // optional } |
958 void ReloadJSON(base::DictionaryValue* args, IPC::Message* reply_message); | 977 void ReloadJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
959 | 978 |
960 // Get the current url of the specified tab. Uses the JSON interface. | |
961 // Example: | |
962 // input: { "windex": 1, "tab_index": 1 } | |
963 // output: { "url": "http://www.google.com" } | |
964 void GetTabURLJSON(base::DictionaryValue* args, IPC::Message* reply_message); | |
965 | |
966 // Get the current url of the specified tab. Uses the JSON interface. | |
967 // Example: | |
968 // input: { "windex": 1, "tab_index": 1 } | |
969 // output: { "title": "Google" } | |
970 void GetTabTitleJSON(base::DictionaryValue* args, | |
971 IPC::Message* reply_message); | |
972 | |
973 // Captures the entire page of the the specified tab, including the | 979 // Captures the entire page of the the specified tab, including the |
974 // non-visible portions of the page, and saves the PNG to a file. | 980 // non-visible portions of the page, and saves the PNG to a file. |
| 981 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 982 // to specify the tab. |
975 // Example: | 983 // Example: |
976 // input: { "windex": 1, "tab_index": 1, "path":"/tmp/foo.png"} | 984 // input: { "windex": 1, |
| 985 // "tab_index": 1, |
| 986 // "tab_id": { "type": 0, "id": "awoein" }, |
| 987 // "path": "/tmp/foo.png" |
| 988 // } |
977 // output: none | 989 // output: none |
978 void CaptureEntirePageJSON( | 990 void CaptureEntirePageJSON( |
979 base::DictionaryValue* args, IPC::Message* reply_message); | 991 base::DictionaryValue* args, IPC::Message* reply_message); |
980 | 992 |
981 // Gets the cookies for the given URL. Uses the JSON interface. | 993 // Gets the cookies for the given URL. Uses the JSON interface. |
982 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, | 994 // "expiry" refers to the amount of seconds since the Unix epoch. If omitted, |
983 // the cookie is valid for the duration of the browser session. | 995 // the cookie is valid for the duration of the browser session. |
984 // Example: | 996 // Example: |
985 // input: { "url": "http://www.google.com" } | 997 // input: { "url": "http://www.google.com" } |
986 // output: { "cookies": [ | 998 // output: { "cookies": [ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 // "secure": false, // optional | 1039 // "secure": false, // optional |
1028 // "expiry": 1401982012 // optional | 1040 // "expiry": 1401982012 // optional |
1029 // } | 1041 // } |
1030 // } | 1042 // } |
1031 // output: none | 1043 // output: none |
1032 void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message); | 1044 void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
1033 | 1045 |
1034 // Gets the ID for every open tab. This ID is unique per session. | 1046 // Gets the ID for every open tab. This ID is unique per session. |
1035 // Example: | 1047 // Example: |
1036 // input: none | 1048 // input: none |
1037 // output: { "ids": [4124, 213, 1] } | 1049 // output: { "ids": [213, 1] } |
1038 void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message); | 1050 void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message); |
1039 | 1051 |
| 1052 // Gets info about all open views. Each view ID is unique per session. |
| 1053 // Example: |
| 1054 // input: none |
| 1055 // output: { "views": [ |
| 1056 // { "type": 0, |
| 1057 // "view_id": "0|1902", |
| 1058 // "extension_id": "askjeoias3" // optional |
| 1059 // } |
| 1060 // ] |
| 1061 // } |
| 1062 void GetViews(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1063 |
1040 // Checks if the given tab ID refers to an open tab. | 1064 // Checks if the given tab ID refers to an open tab. |
1041 // Example: | 1065 // Example: |
1042 // input: { "id": 41 } | 1066 // input: { "id": 41 } |
1043 // output: { "is_valid": false } | 1067 // output: { "is_valid": false } |
1044 void IsTabIdValid(base::DictionaryValue* args, IPC::Message* reply_message); | 1068 void IsTabIdValid(base::DictionaryValue* args, IPC::Message* reply_message); |
1045 | 1069 |
| 1070 // Checks if the given view ID refers to an open view. |
| 1071 // Example: |
| 1072 // input: { "id": "0|1902" } |
| 1073 // output: { "is_valid": false } |
| 1074 void DoesViewExist(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1075 |
1046 // Closes the specified tab. | 1076 // Closes the specified tab. |
| 1077 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 1078 // to specify the tab. |
1047 // Example: | 1079 // Example: |
1048 // input: { "windex": 1, "tab_index": 1 } | 1080 // input: { "windex": 1, |
| 1081 // "tab_index": 1, |
| 1082 // "tab_id": { "type": 0, "id": "awoein" } |
| 1083 // } |
1049 // output: none | 1084 // output: none |
1050 void CloseTabJSON(base::DictionaryValue* args, IPC::Message* reply_message); | 1085 void CloseTabJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
1051 | 1086 |
1052 // Sends the WebKit events for a mouse click at a given coordinate. | 1087 // Sends the WebKit events for a mouse click at a given coordinate. |
| 1088 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1089 // to specify the render view. |
1053 // Example: | 1090 // Example: |
1054 // input: { "windex": 1, | 1091 // input: { "windex": 1, |
1055 // "tab_index": 1, | 1092 // "tab_index": 1, |
| 1093 // "view_id": { "type": 0, "id": "awoein" }, |
1056 // "button": automation::kLeftButton, | 1094 // "button": automation::kLeftButton, |
1057 // "x": 100, | 1095 // "x": 100, |
1058 // "y": 100 | 1096 // "y": 100 |
1059 // } | 1097 // } |
1060 // output: none | 1098 // output: none |
1061 void WebkitMouseClick(base::DictionaryValue* args, | 1099 void WebkitMouseClick(base::DictionaryValue* args, |
1062 IPC::Message* message); | 1100 IPC::Message* message); |
1063 | 1101 |
1064 // Sends the WebKit event for a mouse move to a given coordinate. | 1102 // Sends the WebKit event for a mouse move to a given coordinate. |
| 1103 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1104 // to specify the render view. |
1065 // Example: | 1105 // Example: |
1066 // input: { "windex": 1, | 1106 // input: { "windex": 1, |
1067 // "tab_index": 1, | 1107 // "tab_index": 1, |
| 1108 // "view_id": { "type": 0, "id": "awoein" }, |
1068 // "x": 100, | 1109 // "x": 100, |
1069 // "y": 100 | 1110 // "y": 100 |
1070 // } | 1111 // } |
1071 // output: none | 1112 // output: none |
1072 void WebkitMouseMove(base::DictionaryValue* args, | 1113 void WebkitMouseMove(base::DictionaryValue* args, |
1073 IPC::Message* message); | 1114 IPC::Message* message); |
1074 | 1115 |
1075 // Sends the WebKit events for a mouse drag between two coordinates. | 1116 // Sends the WebKit events for a mouse drag between two coordinates. |
| 1117 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1118 // to specify the render view. |
1076 // Example: | 1119 // Example: |
1077 // input: { "windex": 1, | 1120 // input: { "windex": 1, |
1078 // "tab_index": 1, | 1121 // "tab_index": 1, |
| 1122 // "view_id": { "type": 0, "id": "awoein" }, |
1079 // "start_x": 100, | 1123 // "start_x": 100, |
1080 // "start_y": 100, | 1124 // "start_y": 100, |
1081 // "end_x": 100, | 1125 // "end_x": 100, |
1082 // "end_y": 100 | 1126 // "end_y": 100 |
1083 // } | 1127 // } |
1084 // output: none | 1128 // output: none |
1085 void WebkitMouseDrag(base::DictionaryValue* args, | 1129 void WebkitMouseDrag(base::DictionaryValue* args, |
1086 IPC::Message* message); | 1130 IPC::Message* message); |
1087 | 1131 |
1088 // Sends the WebKit events for a mouse button down at a given coordinate. | 1132 // Sends the WebKit events for a mouse button down at a given coordinate. |
| 1133 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1134 // to specify the render view. |
1089 // Example: | 1135 // Example: |
1090 // input: { "windex": 1, | 1136 // input: { "windex": 1, |
1091 // "tab_index": 1, | 1137 // "tab_index": 1, |
| 1138 // "view_id": { "type": 0, "id": "awoein" }, |
1092 // "x": 100, | 1139 // "x": 100, |
1093 // "y": 100 | 1140 // "y": 100 |
1094 // } | 1141 // } |
1095 // output: none | 1142 // output: none |
1096 void WebkitMouseButtonDown(base::DictionaryValue* args, | 1143 void WebkitMouseButtonDown(base::DictionaryValue* args, |
1097 IPC::Message* message); | 1144 IPC::Message* message); |
1098 | 1145 |
1099 // Sends the WebKit events for a mouse button up at a given coordinate. | 1146 // Sends the WebKit events for a mouse button up at a given coordinate. |
| 1147 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1148 // to specify the render view. |
1100 // Example: | 1149 // Example: |
1101 // input: { "windex": 1, | 1150 // input: { "windex": 1, |
1102 // "tab_index": 1, | 1151 // "tab_index": 1, |
| 1152 // "view_id": { "type": 0, "id": "awoein" }, |
1103 // "x": 100, | 1153 // "x": 100, |
1104 // "y": 100 | 1154 // "y": 100 |
1105 // } | 1155 // } |
1106 // output: none | 1156 // output: none |
1107 void WebkitMouseButtonUp(base::DictionaryValue* args, | 1157 void WebkitMouseButtonUp(base::DictionaryValue* args, |
1108 IPC::Message* message); | 1158 IPC::Message* message); |
1109 | 1159 |
1110 // Sends the WebKit events for a mouse double click at a given coordinate. | 1160 // Sends the WebKit events for a mouse double click at a given coordinate. |
| 1161 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1162 // to specify the render view. |
1111 // Example: | 1163 // Example: |
1112 // input: { "windex": 1, | 1164 // input: { "windex": 1, |
1113 // "tab_index": 1, | 1165 // "tab_index": 1, |
| 1166 // "view_id": { "type": 0, "id": "awoein" }, |
1114 // "x": 100, | 1167 // "x": 100, |
1115 // "y": 100 | 1168 // "y": 100 |
1116 // } | 1169 // } |
1117 // output: none | 1170 // output: none |
1118 void WebkitMouseDoubleClick(base::DictionaryValue* args, | 1171 void WebkitMouseDoubleClick(base::DictionaryValue* args, |
1119 IPC::Message* message); | 1172 IPC::Message* message); |
1120 | 1173 |
1121 // Drag and drop file paths at a given coordinate. | 1174 // Drag and drop file paths at a given coordinate. |
| 1175 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1176 // to specify the render view. |
1122 // Example: | 1177 // Example: |
1123 // input: { "windex": 1, | 1178 // input: { "windex": 1, |
1124 // "tab_index": 1, | 1179 // "tab_index": 1, |
| 1180 // "view_id": { "type": 0, "id": "awoein" }, |
1125 // "x": 100, | 1181 // "x": 100, |
1126 // "y": 100, | 1182 // "y": 100, |
1127 // "paths": [ | 1183 // "paths": [ |
1128 // "/tmp/file.txt" | 1184 // "/tmp/file.txt" |
1129 // ], | 1185 // ], |
1130 // } | 1186 // } |
1131 // output: none | 1187 // output: none |
1132 void DragAndDropFilePaths(base::DictionaryValue* args, | 1188 void DragAndDropFilePaths(base::DictionaryValue* args, |
1133 IPC::Message* message); | 1189 IPC::Message* message); |
1134 | 1190 |
1135 // Sends the WebKit key event with the specified properties. | 1191 // Sends the WebKit key event with the specified properties. |
| 1192 // The pair |windex| and |tab_index| or the single |view_id| must be given |
| 1193 // to specify the render view. |
1136 // Example: | 1194 // Example: |
1137 // input: { "windex": 1, | 1195 // input: { "windex": 1, |
1138 // "tab_index": 1, | 1196 // "tab_index": 1, |
| 1197 // "view_id": { "type": 0, "id": "awoein" }, |
1139 // "type": automation::kRawKeyDownType, | 1198 // "type": automation::kRawKeyDownType, |
1140 // "nativeKeyCode": ui::VKEY_X, | 1199 // "nativeKeyCode": ui::VKEY_X, |
1141 // "windowsKeyCode": ui::VKEY_X, | 1200 // "windowsKeyCode": ui::VKEY_X, |
1142 // "unmodifiedText": "x", | 1201 // "unmodifiedText": "x", |
1143 // "text": "X", | 1202 // "text": "X", |
1144 // "modifiers": automation::kShiftKeyMask, | 1203 // "modifiers": automation::kShiftKeyMask, |
1145 // "isSystemKey": false | 1204 // "isSystemKey": false |
1146 // } | 1205 // } |
1147 // output: none | 1206 // output: none |
1148 void SendWebkitKeyEvent(base::DictionaryValue* args, | 1207 void SendWebkitKeyEvent(base::DictionaryValue* args, |
1149 IPC::Message* message); | 1208 IPC::Message* message); |
1150 | 1209 |
1151 // Sends the key event from the OS level to the browser window, | 1210 // Sends the key event from the OS level to the browser window, |
1152 // allowing it to be preprocessed by some external application (ie. IME). | 1211 // allowing it to be preprocessed by some external application (ie. IME). |
1153 // Will switch to the tab specified by tab_index before sending the event. | 1212 // Will switch to the tab specified by tab_index before sending the event. |
| 1213 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 1214 // to specify the tab. |
1154 // Example: | 1215 // Example: |
1155 // input: { "windex": 1, | 1216 // input: { "windex": 1, |
1156 // "tab_index": 1, | 1217 // "tab_index": 1, |
| 1218 // "tab_id": { "type": 0, "id": "awoein" }, |
1157 // "keyCode": ui::VKEY_X, | 1219 // "keyCode": ui::VKEY_X, |
1158 // "modifiers": automation::kShiftKeyMask, | 1220 // "modifiers": automation::kShiftKeyMask, |
1159 // } | 1221 // } |
1160 // output: none | 1222 // output: none |
1161 void SendOSLevelKeyEventToTab(base::DictionaryValue* args, | 1223 void SendOSLevelKeyEventToTab(base::DictionaryValue* args, |
1162 IPC::Message* message); | 1224 IPC::Message* message); |
1163 | 1225 |
1164 // Method used as a Task that sends a success AutomationJSONReply. | 1226 // Method used as a Task that sends a success AutomationJSONReply. |
1165 void SendSuccessReply(IPC::Message* reply_message); | 1227 void SendSuccessReply(IPC::Message* reply_message); |
1166 | 1228 |
1167 // Gets the active JavaScript modal dialog's message. | 1229 // Gets the active JavaScript modal dialog's message. |
1168 // Example: | 1230 // Example: |
1169 // input: none | 1231 // input: none |
1170 // output: { "message": "This is an alert!" } | 1232 // output: { "message": "This is an alert!" } |
1171 void GetAppModalDialogMessage( | 1233 void GetAppModalDialogMessage( |
1172 base::DictionaryValue* args, IPC::Message* reply_message); | 1234 base::DictionaryValue* args, IPC::Message* reply_message); |
1173 | 1235 |
1174 // Accepts or dismisses the active JavaScript modal dialog. If optional | 1236 // Accepts or dismisses the active JavaScript modal dialog. If optional |
1175 // prompt text is given, it will be used as the result of the prompt dialog. | 1237 // prompt text is given, it will be used as the result of the prompt dialog. |
1176 // Example: | 1238 // Example: |
1177 // input: { "accept": true, | 1239 // input: { "accept": true, |
1178 // "prompt_text": "hello" // optional | 1240 // "prompt_text": "hello" // optional |
1179 // } | 1241 // } |
1180 // output: none | 1242 // output: none |
1181 void AcceptOrDismissAppModalDialog( | 1243 void AcceptOrDismissAppModalDialog( |
1182 base::DictionaryValue* args, IPC::Message* reply_message); | 1244 base::DictionaryValue* args, IPC::Message* reply_message); |
1183 | 1245 |
1184 // Activates the given tab. | 1246 // Activates the given tab. |
| 1247 // The pair |windex| and |tab_index| or the single |tab_id| must be given |
| 1248 // to specify the tab. |
1185 // Example: | 1249 // Example: |
1186 // input: { "windex": 1, | 1250 // input: { "windex": 1, |
1187 // "tab_index": 1, | 1251 // "tab_index": 1, |
| 1252 // "tab_id": { "type": 0, "id": "awoein" } |
1188 // } | 1253 // } |
1189 // output: none | 1254 // output: none |
1190 void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message); | 1255 void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message); |
1191 | 1256 |
1192 // Gets the version of ChromeDriver automation supported by this server. | 1257 // Gets the version of ChromeDriver automation supported by this server. |
1193 // Example: | 1258 // Example: |
1194 // input: none | 1259 // input: none |
1195 // output: { "version": 1 } | 1260 // output: { "version": 1 } |
1196 void GetChromeDriverAutomationVersion(base::DictionaryValue* args, | 1261 void GetChromeDriverAutomationVersion(base::DictionaryValue* args, |
1197 IPC::Message* message); | 1262 IPC::Message* message); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 // Used to enumerate browser profiles. | 1485 // Used to enumerate browser profiles. |
1421 scoped_refptr<ImporterList> importer_list_; | 1486 scoped_refptr<ImporterList> importer_list_; |
1422 | 1487 |
1423 // The stored data for the ImportSettings operation. | 1488 // The stored data for the ImportSettings operation. |
1424 ImportSettingsData import_settings_data_; | 1489 ImportSettingsData import_settings_data_; |
1425 | 1490 |
1426 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1491 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1427 }; | 1492 }; |
1428 | 1493 |
1429 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1494 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |