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

Unified Diff: content/browser/browser_plugin/browser_plugin_embedder.h

Issue 11748034: Browser Plugin: Refactor BrowserPluginEmbedder to allow creating guests with openers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and fixed nits Created 7 years, 11 months 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_embedder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_embedder.h
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.h b/content/browser/browser_plugin/browser_plugin_embedder.h
index b4e846aef1c953bbb254d29e1d00dbae8a61e552..b4e86b688923befbf231ca31813e1cf624cecd78 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.h
+++ b/content/browser/browser_plugin/browser_plugin_embedder.h
@@ -57,6 +57,23 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver,
static BrowserPluginEmbedder* Create(WebContentsImpl* web_contents,
RenderViewHost* render_view_host);
+ // Create a guest WebContents with the provided |instance_id| and |params| and
+ // add it to this BrowserPluginEmbedder. Optionally, the new guest may be
+ // attached to a |guest_opener|, and may be attached a pre-selected
Charlie Reis 2013/01/08 21:13:52 nit: attached to?
+ // |routing_id|.
+ void CreateGuest(int instance_id,
+ int routing_id,
+ BrowserPluginGuest* guest_opener,
+ const BrowserPluginHostMsg_CreateGuest_Params& params);
+
+ // Returns a guest browser plugin delegate by its container ID specified
+ // in BrowserPlugin.
+ BrowserPluginGuest* GetGuestByInstanceID(int instance_id) const;
+
+ // Destroy the guest with the provided |instance_id|. Remove references to the
+ // guest in this BrowserPluginEmbedder.
+ void DestroyGuestByInstanceID(int instance_id);
+
// Overrides factory for testing. Default (NULL) value indicates regular
// (non-test) environment.
static void set_factory_for_testing(BrowserPluginHostFactory* factory) {
@@ -89,12 +106,8 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver,
BrowserPluginEmbedder(WebContentsImpl* web_contents,
RenderViewHost* render_view_host);
- // Returns a guest browser plugin delegate by its container ID specified
- // in BrowserPlugin.
- BrowserPluginGuest* GetGuestByInstanceID(int instance_id) const;
// Adds a new guest web_contents to the embedder (overridable in test).
virtual void AddGuest(int instance_id, WebContents* guest_web_contents);
- void DestroyGuestByInstanceID(int instance_id);
void CleanUp();
// Called when visiblity of web_contents changes, so the embedder will
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698