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

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

Issue 11956022: Browser Plugin: Allocate Instance IDs in BrowserPluginEmbedder instead of BrowserPluginManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT 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 b91837032e24af95b50519a54b3c485a417eaa70..b8450070f171e9a4aa3d27813860789e82f3680d 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.h
+++ b/content/browser/browser_plugin/browser_plugin_embedder.h
@@ -57,10 +57,11 @@ 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 to a pre-selected
- // |routing_id|.
+ // Creates a guest WebContents with the provided |instance_id| and |params|
+ // and adds it to this BrowserPluginEmbedder. If params.src is present, the
+ // new guest will also be navigated to the provided URL. Optionally, the new
+ // guest may be attached to a |guest_opener|, and may be attached to a pre-
+ // selected |routing_id|.
void CreateGuest(int instance_id,
int routing_id,
BrowserPluginGuest* guest_opener,
@@ -70,8 +71,8 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver,
// in BrowserPlugin.
BrowserPluginGuest* GetGuestByInstanceID(int instance_id) const;
- // Destroy the guest with the provided |instance_id|. Remove references to the
- // guest in this BrowserPluginEmbedder.
+ // Destroys the guest with the provided |instance_id|. Removes references to
+ // the guest in this BrowserPluginEmbedder.
void DestroyGuestByInstanceID(int instance_id);
// Overrides factory for testing. Default (NULL) value indicates regular
@@ -118,6 +119,7 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver,
// Message handlers.
+ void OnAllocateInstanceID(int request_id);
void OnCreateGuest(int instance_id,
const BrowserPluginHostMsg_CreateGuest_Params& params);
void OnPluginAtPositionResponse(int instance_id,
@@ -148,6 +150,7 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver,
GetRenderViewHostCallbackMap pending_get_render_view_callbacks_;
// Next request id for BrowserPluginMsg_PluginAtPositionRequest query.
int next_get_render_view_request_id_;
+ int next_instance_id_;
DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
};
« 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