| Index: chrome/browser/automation/automation_util.h
|
| diff --git a/chrome/browser/automation/automation_util.h b/chrome/browser/automation/automation_util.h
|
| index fb3a3f6aa17731c4dd2ec87b025d83f0b5488d19..6a7bfe5a1c332cf16260c17092c4d839d1782429 100644
|
| --- a/chrome/browser/automation/automation_util.h
|
| +++ b/chrome/browser/automation/automation_util.h
|
| @@ -10,10 +10,16 @@
|
|
|
| #include "base/basictypes.h"
|
|
|
| +class AutomationId;
|
| class AutomationProvider;
|
| class Browser;
|
| +class Extension;
|
| +class ExtensionHost;
|
| class GURL;
|
| +class Profile;
|
| +class RenderViewHost;
|
| class TabContents;
|
| +class TabContentsWrapper;
|
|
|
| namespace base {
|
| class DictionaryValue;
|
| @@ -35,6 +41,9 @@ Browser* GetBrowserAt(int index);
|
| // |BrowserList|. If any of these indices are invalid, NULL will be returned.
|
| TabContents* GetTabContentsAt(int browser_index, int tab_index);
|
|
|
| +// Returns the browser that contains the given tab, or NULL if none exists.
|
| +Browser* GetBrowserForTab(TabContents* tab);
|
| +
|
| // Gets the size and value of the cookie string for |url| in the given tab.
|
| // Can be called from any thread.
|
| void GetCookies(const GURL& url,
|
| @@ -77,6 +86,31 @@ void SetCookieJSON(AutomationProvider* provider,
|
| bool SendErrorIfModalDialogActive(AutomationProvider* provider,
|
| IPC::Message* message);
|
|
|
| +// Returns a valid automation ID for the given tab.
|
| +AutomationId GetIdForTab(const TabContentsWrapper* tab);
|
| +
|
| +// Returns a valid automation ID for the extension host.
|
| +AutomationId GetIdForExtensionView(const ExtensionHost* ext_host);
|
| +
|
| +// Returns a valid automation ID for the extension.
|
| +AutomationId GetIdForExtension(const Extension* extension);
|
| +
|
| +// Gets the tab for the given ID. Returns true on success.
|
| +bool GetTabForId(const AutomationId& id, TabContents** tab);
|
| +
|
| +// Gets the render view for the given ID. Returns true on success.
|
| +bool GetRenderViewForId(const AutomationId& id,
|
| + Profile* profile,
|
| + RenderViewHost** rvh);
|
| +
|
| +// Gets the extension for the given ID. Returns true on success.
|
| +bool GetExtensionForId(const AutomationId& id,
|
| + Profile* profile,
|
| + const Extension** extension);
|
| +
|
| +// Returns whether the given ID refers to an actual automation entity.
|
| +bool DoesObjectWithIdExist(const AutomationId& id, Profile* profile);
|
| +
|
| } // namespace automation_util
|
|
|
| #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_
|
|
|