Index: chrome/browser/extensions/extension_host.h |
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h |
index e54fc39be7bb2bb247a4da79aa2597dd17f6f542..a3b04f2cf684037e63e2b9a1a121781f55e77656 100644 |
--- a/chrome/browser/extensions/extension_host.h |
+++ b/chrome/browser/extensions/extension_host.h |
@@ -32,6 +32,9 @@ class ExtensionHost : public RenderViewHostDelegate, |
public RenderViewHostDelegate::View, |
public ExtensionFunctionDispatcher::Delegate { |
public: |
+ // Enable DOM automation in created render view hosts. |
+ static void EnableDOMAutomation() { enable_dom_automation_ = true; } |
+ |
ExtensionHost(Extension* extension, SiteInstance* site_instance, |
const GURL& url); |
~ExtensionHost(); |
@@ -104,6 +107,10 @@ class ExtensionHost : public RenderViewHostDelegate, |
virtual void UpdatePreferredWidth(int pref_width); |
private: |
+ // Whether to allow DOM automation for created RenderViewHosts. This is used |
+ // for testing. |
+ static bool enable_dom_automation_; |
+ |
// ExtensionFunctionDispatcher::Delegate |
// If this ExtensionHost has a view, this returns the Browser that view is a |
// part of. If this is a global background page, we use the active Browser |