summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/automation_proxy.h
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 17:00:29 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 17:00:29 +0000
commit2449703fd43147babd98ad124a396c445c3c3daf (patch)
tree910bf5f4344d79234b7e6e784479002f9997f83f /chrome/test/automation/automation_proxy.h
parentd4bf3bf8357815bf18377b3451d1919b1cd12a05 (diff)
downloadchromium_src-2449703fd43147babd98ad124a396c445c3c3daf.zip
chromium_src-2449703fd43147babd98ad124a396c445c3c3daf.tar.gz
chromium_src-2449703fd43147babd98ad124a396c445c3c3daf.tar.bz2
Making CloseWindow and CloseTab automation API
synchronous and robust. Adding automation APIs with corresponding IPC messages to count and find normal browser windows. Review URL: http://codereview.chromium.org/99268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15058 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/automation_proxy.h')
-rw-r--r--chrome/test/automation/automation_proxy.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index a3a5b68..7669c6d 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -94,6 +94,11 @@ class AutomationProxy : public IPC::Channel::Listener,
// Returns true on success.
bool WaitForWindowCountToBecome(int target_count, int wait_timeout);
+ // Fills the number of open normal browser windows (normal type and
+ // non-incognito mode) into the given variable, returning true on success.
+ // False likely indicates an IPC error.
+ bool GetNormalBrowserWindowCount(int* num_windows);
+
// Returns whether an app modal dialog window is showing right now (i.e., a
// javascript alert), and what buttons it contains.
bool GetShowingAppModalDialog(bool* showing_app_modal_dialog,
@@ -118,6 +123,12 @@ class AutomationProxy : public IPC::Channel::Listener,
// Window numbers are 0-based.
BrowserProxy* GetBrowserWindow(int window_index);
+ // Finds the first browser window that is not incognito mode and of type
+ // TYPE_NORMAL, and returns its corresponding BrowserProxy, transferring
+ // ownership of the pointer to the caller.
+ // On failure, returns NULL.
+ BrowserProxy* FindNormalBrowserWindow();
+
// Returns the BrowserProxy for the browser window which was last active,
// transferring ownership of the pointer to the caller.
// TODO: If there was no last active browser window, or the last active