Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: chrome/browser/automation/testing_automation_provider.h

Issue 10830193: Remove SWIGged use of BrowserProxy and TabProxy from PyAuto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 // The pair |windex| and |tab_index| or the single |auto_id| must be given 1384 // The pair |windex| and |tab_index| or the single |auto_id| must be given
1405 // to specify the tab. 1385 // to specify the tab.
1406 // Example: 1386 // Example:
1407 // input: { "windex": 1, 1387 // input: { "windex": 1,
1408 // "tab_index": 1, 1388 // "tab_index": 1,
1409 // "auto_id": { "type": 0, "id": "awoein" } 1389 // "auto_id": { "type": 0, "id": "awoein" }
1410 // } 1390 // }
1411 // output: none 1391 // output: none
1412 void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message); 1392 void ActivateTabJSON(base::DictionaryValue* args, IPC::Message* message);
1413 1393
1394 // Blocks until the given tab is restored.
1395 // Uses the JSON interface.
1396 void WaitForTabToBeRestored(DictionaryValue* args,
1397 IPC::Message* reply_message);
1398
1399 // Simulates an action on the SSL blocking page at the specified tab.
1400 // If |proceed| is true, it is equivalent to the user pressing the
1401 // 'Proceed' button, if false the 'Get me out of there button'.
1402 // Note that this fails if the tab is not displaying a SSL blocking page.
1403 // Uses the JSON interface.
1404 // Example:
1405 // input: { "windex": 1,
1406 // "tab_index": 1,
1407 // "proceed": true
1408 // }
1409 // output: none
1410 void ActionOnSSLBlockingPage(DictionaryValue* args,
1411 IPC::Message* reply_message);
1412
1413 // Gets the security state for the given tab. Uses the JSON interface.
1414 // Example:
1415 // input: { "windex": 1,
1416 // "tab_index": 1,
1417 // }
1418 // output: { "security_style": SECURITY_STYLE_AUTHENTICATED,
1419 // "ssl_cert_status": 3, // bitmask of status flags
1420 // "insecure_content_status": 1, // bitmask of ContentStatusFlags
1421 // }
1422 void GetSecurityState(DictionaryValue* args,
1423 IPC::Message* reply_message);
1424
1414 // Brings the given brower's window to the front. 1425 // Brings the given brower's window to the front.
1415 // Example: 1426 // Example:
1416 // input: { "windex": 1 } 1427 // input: { "windex": 1 }
1417 // output: none 1428 // output: none
1418 void BringBrowserToFrontJSON(base::DictionaryValue* args, 1429 void BringBrowserToFrontJSON(base::DictionaryValue* args,
1419 IPC::Message* message); 1430 IPC::Message* message);
1420 1431
1421 // Gets the version of ChromeDriver automation supported by this server. 1432 // Gets the version of ChromeDriver automation supported by this server.
1422 // Example: 1433 // Example:
1423 // input: none 1434 // input: none
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 scoped_ptr<AutomationEventQueue> automation_event_queue_; 1711 scoped_ptr<AutomationEventQueue> automation_event_queue_;
1701 1712
1702 // List of commands which just finish synchronously and don't require 1713 // List of commands which just finish synchronously and don't require
1703 // setting up an observer. 1714 // setting up an observer.
1704 static const int kSynchronousCommands[]; 1715 static const int kSynchronousCommands[];
1705 1716
1706 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); 1717 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider);
1707 }; 1718 };
1708 1719
1709 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ 1720 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698