diff options
author | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-20 15:35:12 +0000 |
---|---|---|
committer | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-20 15:35:12 +0000 |
commit | 7f087fb3893209a9c1e34d9c3ebc04c74015576e (patch) | |
tree | 1ab1da1d2ec76e1e1f32da94c45aabb5352559a3 /content/browser/web_contents/web_contents_impl.h | |
parent | ef935ae14a48169f3b81a46f3ce0e9a5a88bc3c9 (diff) | |
download | chromium_src-7f087fb3893209a9c1e34d9c3ebc04c74015576e.zip chromium_src-7f087fb3893209a9c1e34d9c3ebc04c74015576e.tar.gz chromium_src-7f087fb3893209a9c1e34d9c3ebc04c74015576e.tar.bz2 |
This is followup from Charlie's comments on Fady's cl: http://chromiumcodereview.appspot.com/10560022, it seems I cannot upload patch to that issue (since I'm not owner), I'm creating a new one.
Split Embedder and Guest 'roles' for browser plugin, web contents can now play any or both roles, main idea is to have more readable separation between the two.
Also stop creating browser_plugin counterpart in browser/host for every web_contents, instead create them only when there's a browser_plugin element.
BUG= 141232
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157650
Review URL: https://chromiumcodereview.appspot.com/10868012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/web_contents/web_contents_impl.h')
-rw-r--r-- | content/browser/web_contents/web_contents_impl.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 2fda9db..2dcbfd2 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -39,6 +39,8 @@ class WebContentsImpl; struct ViewMsg_PostMessage_Params; namespace content { +class BrowserPluginEmbedder; +class BrowserPluginGuest; class ColorChooser; class DownloadItem; class JavaScriptDialogCreator; @@ -89,6 +91,11 @@ class CONTENT_EXPORT WebContentsImpl const WebContentsImpl* base_web_contents, WebContentsImpl* opener); + // Creates a WebContents to be used as a browser plugin guest. + static WebContentsImpl* CreateGuest(content::BrowserContext* browser_context, + const std::string& host, + int guest_instance_id); + // Returns the content specific prefs for the given RVH. static webkit_glue::WebPreferences GetWebkitPrefs( content::RenderViewHost* rvh, const GURL& url); @@ -162,6 +169,13 @@ class CONTENT_EXPORT WebContentsImpl // Expose the render manager for testing. RenderViewHostManager* GetRenderManagerForTesting(); + // Returns guest browser plugin object, or NULL if this WebContents is not a + // guest. + content::BrowserPluginGuest* GetBrowserPluginGuest(); + // Returns embedder browser plugin object, or NULL if this WebContents is not + // an embedder. + content::BrowserPluginEmbedder* GetBrowserPluginEmbedder(); + // content::WebContents ------------------------------------------------------ virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; @@ -552,6 +566,10 @@ class CONTENT_EXPORT WebContentsImpl void OnRequestPpapiBrokerPermission(int request_id, const GURL& url, const FilePath& plugin_path); + void OnBrowserPluginNavigateGuest(int instance_id, + int64 frame_id, + const std::string& src, + const gfx::Size& size); // Changes the IsLoading state and notifies delegate as needed // |details| is used to provide details on the load that just finished @@ -657,6 +675,9 @@ class CONTENT_EXPORT WebContentsImpl std::string* embedder_channel_name, int* embedder_container_id); + // Removes browser plugin embedder if there is one. + void RemoveBrowserPluginEmbedder(); + // Data for core operation --------------------------------------------------- // Delegate for notifying our owner about stuff. Not owned by us. @@ -704,7 +725,7 @@ class CONTENT_EXPORT WebContentsImpl java_bridge_dispatcher_host_manager_; // TODO(fsamuel): Remove this once upstreaming of the new browser plugin - // implmentation is complete. + // implementation is complete. // Manages the browser plugin instances hosted by this WebContents. scoped_ptr<content::old::BrowserPluginHost> old_browser_plugin_host_; @@ -823,6 +844,13 @@ class CONTENT_EXPORT WebContentsImpl // Color chooser that was opened by this tab. content::ColorChooser* color_chooser_; + // Manages the embedder state for browser plugins, if this WebContents is an + // embedder; NULL otherwise. + scoped_ptr<content::BrowserPluginEmbedder> browser_plugin_embedder_; + // Manages the guest state for browser plugin, if this WebContents is a guest; + // NULL otherwise. + scoped_ptr<content::BrowserPluginGuest> browser_plugin_guest_; + // This must be at the end, or else we might get notifications and use other // member variables that are gone. content::NotificationRegistrar registrar_; |