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

Unified Diff: chrome/test/ui/ui_test.h

Issue 92001: Restore closed tabs into new windows when necessary, and track the windows th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/automation/browser_proxy.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/ui_test.h
===================================================================
--- chrome/test/ui/ui_test.h (revision 14184)
+++ chrome/test/ui/ui_test.h (working copy)
@@ -96,16 +96,29 @@
// This method doesn't return until the navigation is complete.
void NavigateToURL(const GURL& url);
- // Returns the URL of the currently active tab. If there is no active tab,
- // or some other error, the returned URL will be empty.
- GURL GetActiveTabURL();
+ // Returns the URL of the currently active tab. Only looks in the first
+ // window, for backward compatibility. If there is no active tab, or some
+ // other error, the returned URL will be empty.
+ GURL GetActiveTabURL() { return GetActiveTabURL(0); }
- // Returns the title of the currently active tab.
- std::wstring GetActiveTabTitle();
+ // Like above, but looks at the window at the given index.
+ GURL GetActiveTabURL(int window_index);
- // Returns the tabstrip index of the currently active tab, or -1 on error.
- int GetActiveTabIndex();
+ // Returns the title of the currently active tab. Only looks in the first
+ // window, for backward compatibility.
+ std::wstring GetActiveTabTitle() { return GetActiveTabTitle(0); }
+ // Like above, but looks at the window at the given index.
+ std::wstring GetActiveTabTitle(int window_index);
+
+ // Returns the tabstrip index of the currently active tab in the window at
+ // the given index, or -1 on error. Only looks in the first window, for
+ // backward compatibility.
+ int GetActiveTabIndex() { return GetActiveTabIndex(0); }
+
+ // Like above, but looks at the window at the given index.
+ int GetActiveTabIndex(int window_index);
+
// Returns true when the browser process is running, independent if any
// renderer process exists or not. It will returns false if an user closed the
// window or if the browser process died by itself.
@@ -410,10 +423,14 @@
void CleanupAppProcesses();
// Returns the proxy for the currently active tab, or NULL if there is no
- // tab or there was some kind of error. The returned pointer MUST be
- // deleted by the caller if non-NULL.
- TabProxy* GetActiveTab();
+ // tab or there was some kind of error. Only looks at the first window, for
+ // backward compatibility. The returned pointer MUST be deleted by the
+ // caller if non-NULL.
+ TabProxy* GetActiveTab() { return GetActiveTab(0); }
+ // Like above, but looks at the window at the given index.
+ TabProxy* GetActiveTab(int window_index);
+
// ********* Member variables *********
std::wstring browser_directory_; // Path to the browser executable,
« no previous file with comments | « chrome/test/automation/browser_proxy.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698