summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/browser_proxy.h
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 19:12:46 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 19:12:46 +0000
commit802376eb9aacca5284b76da93face73a9488bdb6 (patch)
tree705226a6750fed9a1429aaf07fe9c0a03303c759 /chrome/test/automation/browser_proxy.h
parent319d4ae6c8b2236fa7e0acf218c533a5a93af5a6 (diff)
downloadchromium_src-802376eb9aacca5284b76da93face73a9488bdb6.zip
chromium_src-802376eb9aacca5284b76da93face73a9488bdb6.tar.gz
chromium_src-802376eb9aacca5284b76da93face73a9488bdb6.tar.bz2
Make automation proxy objects to ref_counted. That allows to process async notifications directly in channel background thread. Add support for listener-less ChannelProxy.
BUG=none TEST=none Review URL: http://codereview.chromium.org/113722 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/browser_proxy.h')
-rw-r--r--chrome/test/automation/browser_proxy.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h
index 7f69681..98e64de 100644
--- a/chrome/test/automation/browser_proxy.h
+++ b/chrome/test/automation/browser_proxy.h
@@ -34,7 +34,6 @@ class BrowserProxy : public AutomationResourceProxy {
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 @@ class BrowserProxy : public AutomationResourceProxy {
//
// 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 @@ class BrowserProxy : public AutomationResourceProxy {
// 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);
};