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

Unified Diff: chrome/test/automation/automation_proxy.h

Issue 113722: Make automation proxy objects to ref_counted. That allows to process async no... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/automation_handle_tracker.cc ('k') | chrome/test/automation/automation_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/automation_proxy.h
===================================================================
--- chrome/test/automation/automation_proxy.h (revision 17078)
+++ chrome/test/automation/automation_proxy.h (working copy)
@@ -120,13 +120,13 @@
//
// Use GetBrowserWindowCount to see how many browser windows you can ask for.
// Window numbers are 0-based.
- BrowserProxy* GetBrowserWindow(int window_index);
+ scoped_refptr<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();
+ scoped_refptr<BrowserProxy> FindNormalBrowserWindow();
// Returns the BrowserProxy for the browser window which was last active,
// transferring ownership of the pointer to the caller.
@@ -134,12 +134,12 @@
// browser window no longer exists (for example, if it was closed),
// returns GetBrowserWindow(0). See crbug.com/10501. As for now this
// function is flakey.
- BrowserProxy* GetLastActiveBrowserWindow();
+ scoped_refptr<BrowserProxy> GetLastActiveBrowserWindow();
// Returns the WindowProxy for the currently active window, transferring
// ownership of the pointer to the caller.
// On failure, returns NULL.
- WindowProxy* GetActiveWindow();
+ scoped_refptr<WindowProxy> GetActiveWindow();
// Tells the browser to enable or disable network request filtering. Returns
// false if the message fails to send to the browser.
@@ -192,9 +192,9 @@
// Creates a tab that can hosted in an external process. The function
// returns a TabProxy representing the tab as well as a window handle
// that can be reparented in another process.
- TabProxy* CreateExternalTab(HWND parent, const gfx::Rect& dimensions,
- unsigned int style, bool incognito,
- HWND* external_tab_container);
+ scoped_refptr<TabProxy> CreateExternalTab(HWND parent,
+ const gfx::Rect& dimensions, unsigned int style, bool incognito,
+ HWND* external_tab_container);
#endif // defined(OS_WIN)
int command_execution_timeout_ms() const {
@@ -216,6 +216,7 @@
}
private:
+ template <class T> scoped_refptr<T> ProxyObjectFromHandle(int handle);
void InitializeChannelID();
void InitializeThread();
void InitializeChannel();
« no previous file with comments | « chrome/test/automation/automation_handle_tracker.cc ('k') | chrome/test/automation/automation_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698