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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11956022: Browser Plugin: Allocate Instance IDs in BrowserPluginEmbedder instead of BrowserPluginManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Diff against simplified focus 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
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 02600f35c018bf938b1a7eacbf4bf6e28ca18602..38bc6afa1f8c28a7f15220e4c5d33eb567933854 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -739,8 +739,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
OnRequestPpapiBrokerPermission)
- IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_CreateGuest,
- OnBrowserPluginCreateGuest)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_AllocateInstanceIDRequest,
+ OnBrowserPluginAllocateInstanceID)
IPC_MESSAGE_HANDLER(IconHostMsg_DidDownloadFavicon, OnDidDownloadFavicon)
IPC_MESSAGE_HANDLER(IconHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -2349,9 +2349,7 @@ void WebContentsImpl::OnPpapiBrokerPermissionResult(int request_id,
result));
}
-void WebContentsImpl::OnBrowserPluginCreateGuest(
- int instance_id,
- const BrowserPluginHostMsg_CreateGuest_Params& params) {
+void WebContentsImpl::OnBrowserPluginAllocateInstanceID(int request_id) {
// This creates a BrowserPluginEmbedder, which handles all the BrowserPlugin
// specific messages for this WebContents (through its
// BrowserPluginEmbedderHelper). This means that any message from browser
@@ -2367,9 +2365,9 @@ void WebContentsImpl::OnBrowserPluginCreateGuest(
CHECK(!browser_plugin_embedder_.get());
browser_plugin_embedder_.reset(
BrowserPluginEmbedder::Create(this, GetRenderViewHost()));
- BrowserPluginHostMsg_CreateGuest create_guest_msg(
- GetRenderViewHost()->GetRoutingID(), instance_id, params);
- browser_plugin_embedder_->OnMessageReceived(create_guest_msg);
+ BrowserPluginHostMsg_AllocateInstanceIDRequest request_msg(
+ GetRenderViewHost()->GetRoutingID(), request_id);
+ browser_plugin_embedder_->OnMessageReceived(request_msg);
}
void WebContentsImpl::OnDidDownloadFavicon(

Powered by Google App Engine
This is Rietveld 408576698