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

Unified Diff: chrome/browser/automation/automation_util.h

Issue 8790003: Allow the automation provider to accept an ID for performing render-view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years 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
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..99874b4efab7bf6ca1c5fd9f47a516ada0fab34e 100644
--- a/chrome/browser/automation/automation_util.h
+++ b/chrome/browser/automation/automation_util.h
@@ -9,11 +9,18 @@
#include <string>
#include "base/basictypes.h"
+#include "chrome/common/chrome_view_type.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;
@@ -77,6 +84,27 @@ 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);
+
+// Returns whether the given ID refers to a actual automation entity.
dennis_jeffrey 2011/12/03 00:19:37 nit: 'a actual' --> 'an actual'
kkania 2011/12/03 00:34:31 Done.
+bool DoesObjectWithIdExist(const AutomationId& id, Profile* profile);
+
} // namespace automation_util
#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698