<webview>: Cleanup ContentBrowserClient::GuestWebContentsCreated

Introduce a GuestView::Create factory method to allow creating a particular GuestView subtype based on the view type. This makes reading code in ChromeContentBrowserClient::GuestWebContentsCreated a lot easier.

BUG=none

Review URL: https://chromiumcodereview.appspot.com/23620050

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223129 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/guestview/guestview.h b/chrome/browser/guestview/guestview.h
index b83dbfd..e3137f5 100644
--- a/chrome/browser/guestview/guestview.h
+++ b/chrome/browser/guestview/guestview.h
@@ -40,7 +40,10 @@
     scoped_ptr<DictionaryValue> args_;
   };
 
-  explicit GuestView(content::WebContents* guest_web_contents);
+  static Type GetViewTypeFromString(const std::string& api_type);
+
+  static GuestView* Create(content::WebContents* guest_web_contents,
+                           Type view_type);
 
   static GuestView* FromWebContents(content::WebContents* web_contents);
 
@@ -89,6 +92,7 @@
   int embedder_routing_id() const { return embedder_routing_id_; }
 
  protected:
+  explicit GuestView(content::WebContents* guest_web_contents);
   virtual ~GuestView();
 
   // Dispatches an event |event_name| to the embedder with the |event| fields.