Pull out ExtensionHost::ProcessCreationQueue into a separate interface,
ExtensionHostQueue, and its only implementation, SerialExtensionHostQueue. This
will allow easily experimenting with alternative queuing mechanisms.

BUG=453073
[email protected]

Review URL: https://codereview.chromium.org/931283003

Cr-Commit-Position: refs/heads/master@{#316862}
diff --git a/extensions/browser/extension_host.h b/extensions/browser/extension_host.h
index d7502593..d7803cf9 100644
--- a/extensions/browser/extension_host.h
+++ b/extensions/browser/extension_host.h
@@ -34,6 +34,7 @@
 class Extension;
 class ExtensionHostDelegate;
 class ExtensionHostObserver;
+class ExtensionHostQueue;
 class WindowController;
 
 // This class is the browser component of an extension component's RenderView.
@@ -48,8 +49,6 @@
                       public ExtensionFunctionDispatcher::Delegate,
                       public content::NotificationObserver {
  public:
-  class ProcessCreationQueue;
-
   ExtensionHost(const Extension* extension,
                 content::SiteInstance* site_instance,
                 const GURL& url, ViewType host_type);
@@ -78,6 +77,10 @@
   // (can be NULL). This happens delayed to avoid locking the UI.
   void CreateRenderViewSoon();
 
+  // DO NOT CALL THIS. Always use CreateRenderViewSoon().
+  // (Unless you're implementing an ExtensionHostQueue).
+  void CreateRenderViewNow();
+
   // Closes this host (results in [possibly asynchronous] deletion).
   void Close();
 
@@ -144,11 +147,6 @@
   virtual bool IsBackgroundPage() const;
 
  private:
-  friend class ProcessCreationQueue;
-
-  // Actually create the RenderView for this host. See CreateRenderViewSoon.
-  void CreateRenderViewNow();
-
   // Message handlers.
   void OnRequest(const ExtensionHostMsg_Request_Params& params);
   void OnEventAck(int message_id);