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_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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 void AddHistoryItem(Browser* browser, | 361 void AddHistoryItem(Browser* browser, |
362 base::DictionaryValue* args, | 362 base::DictionaryValue* args, |
363 IPC::Message* reply_message); | 363 IPC::Message* reply_message); |
364 | 364 |
365 // Invoke loading of template url model. | 365 // Invoke loading of template url model. |
366 // Uses the JSON interface for input/output. | 366 // Uses the JSON interface for input/output. |
367 void LoadSearchEngineInfo(Browser* browser, | 367 void LoadSearchEngineInfo(Browser* browser, |
368 base::DictionaryValue* args, | 368 base::DictionaryValue* args, |
369 IPC::Message* reply_message); | 369 IPC::Message* reply_message); |
370 | 370 |
| 371 // Sets the visibility of the download shelf. Uses the JSON interface. |
| 372 // Example: |
| 373 // input: { "is_visible": true, |
| 374 // "windex": 1, |
| 375 // } |
| 376 // output: none |
| 377 void SetDownloadShelfVisibleJSON(base::DictionaryValue* args, |
| 378 IPC::Message* reply_message); |
| 379 |
| 380 // Gets the visibility of the download shelf. Uses the JSON interface. |
| 381 // Example: |
| 382 // input: { "windex": 1 } |
| 383 // output: { "is_visible": true } |
| 384 void IsDownloadShelfVisibleJSON(base::DictionaryValue* args, |
| 385 IPC::Message* reply_message); |
| 386 |
| 387 // Gets the download path of the given tab. Uses the JSON interface. |
| 388 // Example: |
| 389 // input: { "tab_index": 1, |
| 390 // "windex": 1, |
| 391 // } |
| 392 // output: { "path": "/home/foobar/Downloads" } |
| 393 void GetDownloadDirectoryJSON(base::DictionaryValue* args, |
| 394 IPC::Message* reply_message); |
| 395 |
371 // Get search engines list. | 396 // Get search engines list. |
372 // Assumes that the profile's template url model is loaded. | 397 // Assumes that the profile's template url model is loaded. |
373 // Uses the JSON interface for input/output. | 398 // Uses the JSON interface for input/output. |
374 void GetSearchEngineInfo(Browser* browser, | 399 void GetSearchEngineInfo(Browser* browser, |
375 base::DictionaryValue* args, | 400 base::DictionaryValue* args, |
376 IPC::Message* reply_message); | 401 IPC::Message* reply_message); |
377 | 402 |
378 // Add or edit search engine. | 403 // Add or edit search engine. |
379 // Assumes that the profile's template url model is loaded. | 404 // Assumes that the profile's template url model is loaded. |
380 // Uses the JSON interface for input/output. | 405 // Uses the JSON interface for input/output. |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 // "value": "123101", | 1115 // "value": "123101", |
1091 // "path": "/", // optional | 1116 // "path": "/", // optional |
1092 // "domain": ".www.google.com", // optional | 1117 // "domain": ".www.google.com", // optional |
1093 // "secure": false, // optional | 1118 // "secure": false, // optional |
1094 // "expiry": 1401982012 // optional | 1119 // "expiry": 1401982012 // optional |
1095 // } | 1120 // } |
1096 // } | 1121 // } |
1097 // output: none | 1122 // output: none |
1098 void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message); | 1123 void SetCookieJSON(base::DictionaryValue* args, IPC::Message* reply_message); |
1099 | 1124 |
| 1125 // Gets the cookies for the given URL in the context of a given tab. Uses the |
| 1126 // JSON interface. |
| 1127 // Example: |
| 1128 // input: { "url": "http://www.google.com", |
| 1129 // "tab_index": 1, |
| 1130 // "windex": 1, |
| 1131 // } |
| 1132 // output: { "cookies": "foo=bar" } |
| 1133 void GetTabCookiesJSON(base::DictionaryValue* args, |
| 1134 IPC::Message* reply_message); |
| 1135 |
| 1136 // Deletes the cookie with the given name for the URL in the context of a |
| 1137 // given tab. Uses the JSON interface. |
| 1138 // Example: |
| 1139 // input: { "url": "http://www.google.com", |
| 1140 // "cookie_name": "my_cookie" |
| 1141 // "tab_index": 1, |
| 1142 // "windex": 1, |
| 1143 // } |
| 1144 // output: none |
| 1145 void DeleteTabCookieJSON(base::DictionaryValue* args, |
| 1146 IPC::Message* reply_message); |
| 1147 |
| 1148 // Sets a cookie for the given URL in the context of a given tab. Uses the |
| 1149 // JSON interface. |
| 1150 // |
| 1151 // Example: |
| 1152 // input: { "url": "http://www.google.com", |
| 1153 // "value": "name=value; Expires=Wed, 09 Jun 2021 10:18:14 GMT", |
| 1154 // "tab_index": 1, |
| 1155 // "windex": 1, |
| 1156 // } |
| 1157 // output: none |
| 1158 void SetTabCookieJSON(base::DictionaryValue* args, |
| 1159 IPC::Message* reply_message); |
| 1160 |
1100 // Gets the ID for every open tab. This ID is unique per session. | 1161 // Gets the ID for every open tab. This ID is unique per session. |
1101 // Example: | 1162 // Example: |
1102 // input: none | 1163 // input: none |
1103 // output: { "ids": [213, 1] } | 1164 // output: { "ids": [213, 1] } |
1104 void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message); | 1165 void GetTabIds(base::DictionaryValue* args, IPC::Message* reply_message); |
1105 | 1166 |
1106 // Gets info about all open views. Each view ID is unique per session. | 1167 // Gets info about all open views. Each view ID is unique per session. |
1107 // Example: | 1168 // Example: |
1108 // input: none | 1169 // input: none |
1109 // output: { "views": [ | 1170 // output: { "views": [ |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1630 scoped_ptr<AutomationEventQueue> automation_event_queue_; | 1691 scoped_ptr<AutomationEventQueue> automation_event_queue_; |
1631 | 1692 |
1632 // List of commands which just finish synchronously and don't require | 1693 // List of commands which just finish synchronously and don't require |
1633 // setting up an observer. | 1694 // setting up an observer. |
1634 static const int kSynchronousCommands[]; | 1695 static const int kSynchronousCommands[]; |
1635 | 1696 |
1636 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1697 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1637 }; | 1698 }; |
1638 | 1699 |
1639 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1700 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |