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

Unified Diff: chrome/test/automation/browser_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_proxy_uitest.cc ('k') | chrome/test/automation/browser_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/browser_proxy.h
===================================================================
--- chrome/test/automation/browser_proxy.h (revision 17078)
+++ chrome/test/automation/browser_proxy.h (working copy)
@@ -34,7 +34,6 @@
AutomationHandleTracker* tracker,
int handle)
: AutomationResourceProxy(tracker, sender, handle) {}
- virtual ~BrowserProxy() {}
// Activates the tab corresponding to (zero-based) tab_index. Returns true if
// successful.
@@ -89,26 +88,27 @@
//
// Use GetTabCount to see how many windows you can ask for. Tab numbers
// are 0-based.
- TabProxy* GetTab(int tab_index) const;
+ scoped_refptr<TabProxy> GetTab(int tab_index) const;
// Returns the TabProxy for the currently active tab, transferring
// ownership of the pointer to the caller. On failure, returns NULL.
- TabProxy* GetActiveTab() const;
+ scoped_refptr<TabProxy> GetActiveTab() const;
// Like GetActiveTab, but returns NULL if no response is received before
// the specified timout.
- TabProxy* GetActiveTabWithTimeout(uint32 timeout_ms, bool* is_timeout) const;
+ scoped_refptr<TabProxy> GetActiveTabWithTimeout(uint32 timeout_ms,
+ bool* is_timeout) const;
// Returns the WindowProxy for this browser's window. It can be used to
// retreive view bounds, simulate clicks and key press events. The caller
// owns the returned WindowProxy.
// On failure, returns NULL.
- WindowProxy* GetWindow() const;
+ scoped_refptr<WindowProxy> GetWindow() const;
// Returns an AutocompleteEdit for this browser's window. It can be used to
// manipulate the omnibox. The caller owns the returned pointer.
// On failure, returns NULL.
- AutocompleteEditProxy* GetAutocompleteEdit();
+ scoped_refptr<AutocompleteEditProxy> GetAutocompleteEdit();
// Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...)
// The list can be found at chrome/app/chrome_dll_resource.h
@@ -198,6 +198,8 @@
// Sets the boolean value of the specified preference.
bool SetBooleanPreference(const std::wstring& name, bool value);
+ protected:
+ virtual ~BrowserProxy() {}
private:
DISALLOW_COPY_AND_ASSIGN(BrowserProxy);
};
« no previous file with comments | « chrome/test/automation/automation_proxy_uitest.cc ('k') | chrome/test/automation/browser_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698