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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 IPC::Message* reply_message); | 140 IPC::Message* reply_message); |
141 | 141 |
142 // If |show| is true, call Show() on the new window after creating it. | 142 // If |show| is true, call Show() on the new window after creating it. |
143 void OpenNewBrowserWindowOfType(int type, | 143 void OpenNewBrowserWindowOfType(int type, |
144 bool show, | 144 bool show, |
145 IPC::Message* reply_message); | 145 IPC::Message* reply_message); |
146 | 146 |
147 // Retrieves a Browser from a Window and vice-versa. | 147 // Retrieves a Browser from a Window and vice-versa. |
148 void GetWindowForBrowser(int window_handle, bool* success, int* handle); | 148 void GetWindowForBrowser(int window_handle, bool* success, int* handle); |
149 | 149 |
150 void WaitForTabToBeRestored(int tab_handle, IPC::Message* reply_message); | |
151 | |
152 // Gets the security state for the tab associated to the specified |handle|. | |
153 void GetSecurityState(int handle, | |
154 bool* success, | |
155 content::SecurityStyle* security_style, | |
156 net::CertStatus* ssl_cert_status, | |
157 int* insecure_content_status); | |
158 | |
159 // Gets the page type for the tab associated to the specified |handle|. | |
160 void GetPageType(int handle, bool* success, content::PageType* page_type); | |
161 | |
162 // Gets the duration in ms of the last event matching |event_name|. | 150 // Gets the duration in ms of the last event matching |event_name|. |
163 // |duration_ms| is -1 if the event hasn't occurred yet. | 151 // |duration_ms| is -1 if the event hasn't occurred yet. |
164 void GetMetricEventDuration(const std::string& event_name, int* duration_ms); | 152 void GetMetricEventDuration(const std::string& event_name, int* duration_ms); |
165 | 153 |
166 // Simulates an action on the SSL blocking page at the tab specified by | |
167 // |handle|. If |proceed| is true, it is equivalent to the user pressing the | |
168 // 'Proceed' button, if false the 'Get me out of there button'. | |
169 // Not that this fails if the tab is not displaying a SSL blocking page. | |
170 void ActionOnSSLBlockingPage(int handle, | |
171 bool proceed, | |
172 IPC::Message* reply_message); | |
173 | |
174 // Brings the browser window to the front and activates it. | 154 // Brings the browser window to the front and activates it. |
175 void BringBrowserToFront(int browser_handle, bool* success); | 155 void BringBrowserToFront(int browser_handle, bool* success); |
176 | 156 |
177 // Responds to requests to open the FindInPage window. | 157 // Responds to requests to open the FindInPage window. |
178 void HandleOpenFindInPageRequest(const IPC::Message& message, | 158 void HandleOpenFindInPageRequest(const IPC::Message& message, |
179 int handle); | 159 int handle); |
180 | 160 |
181 // Get the visibility state of the Find window. | 161 // Get the visibility state of the Find window. |
182 void GetFindWindowVisibility(int handle, bool* visible); | 162 void GetFindWindowVisibility(int handle, bool* visible); |
183 | 163 |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 // The pair |windex| and |tab_index| or the single |auto_id| must be given | 1415 // The pair |windex| and |tab_index| or the single |auto_id| must be given |
1436 // to specify the tab. | 1416 // to specify the tab. |
1437 // Example: | 1417 // Example: |
1438 // input: { "windex": 1, | 1418 // input: { "windex": 1, |
1439 // "tab_index": 1, | 1419 // "tab_index": 1, |
1440 // "auto_id": { "type": 0, "id": "awoein" } | 1420 // "auto_id": { "type": 0, "id": "awoein" } |
1441 // } | 1421 // } |
1442 // output: none | 1422 // output: none |
1443 void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message); | 1423 void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message); |
1444 | 1424 |
| 1425 // Blocks until the given tab is restored. |
| 1426 // Uses the JSON interface. |
| 1427 void WaitForTabToBeRestored(DictionaryValue* args, |
| 1428 IPC::Message* reply_message); |
| 1429 |
| 1430 // Simulates an action on the SSL blocking page at the specified tab. |
| 1431 // If |proceed| is true, it is equivalent to the user pressing the |
| 1432 // 'Proceed' button, if false the 'Get me out of there button'. |
| 1433 // Note that this fails if the tab is not displaying a SSL blocking page. |
| 1434 // Uses the JSON interface. |
| 1435 // Example: |
| 1436 // input: { "windex": 1, |
| 1437 // "tab_index": 1, |
| 1438 // "proceed": true |
| 1439 // } |
| 1440 // output: none |
| 1441 void ActionOnSSLBlockingPage(DictionaryValue* args, |
| 1442 IPC::Message* reply_message); |
| 1443 |
| 1444 // Gets the security state for the given tab. Uses the JSON interface. |
| 1445 // Example: |
| 1446 // input: { "windex": 1, |
| 1447 // "tab_index": 1, |
| 1448 // } |
| 1449 // output: { "security_style": SECURITY_STYLE_AUTHENTICATED, |
| 1450 // "ssl_cert_status": 3, // bitmask of status flags |
| 1451 // "insecure_content_status": 1, // bitmask of ContentStatusFlags |
| 1452 // } |
| 1453 void GetSecurityState(DictionaryValue* args, |
| 1454 IPC::Message* reply_message); |
| 1455 |
1445 // Brings the given brower's window to the front. | 1456 // Brings the given brower's window to the front. |
1446 // Example: | 1457 // Example: |
1447 // input: { "windex": 1 } | 1458 // input: { "windex": 1 } |
1448 // output: none | 1459 // output: none |
1449 void BringBrowserToFrontJSON(base::DictionaryValue* args, | 1460 void BringBrowserToFrontJSON(base::DictionaryValue* args, |
1450 IPC::Message* message); | 1461 IPC::Message* message); |
1451 | 1462 |
1452 // Gets the version of ChromeDriver automation supported by this server. | 1463 // Gets the version of ChromeDriver automation supported by this server. |
1453 // Example: | 1464 // Example: |
1454 // input: none | 1465 // input: none |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1728 scoped_ptr<AutomationEventQueue> automation_event_queue_; | 1739 scoped_ptr<AutomationEventQueue> automation_event_queue_; |
1729 | 1740 |
1730 // List of commands which just finish synchronously and don't require | 1741 // List of commands which just finish synchronously and don't require |
1731 // setting up an observer. | 1742 // setting up an observer. |
1732 static const int kSynchronousCommands[]; | 1743 static const int kSynchronousCommands[]; |
1733 | 1744 |
1734 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1745 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1735 }; | 1746 }; |
1736 | 1747 |
1737 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1748 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |