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

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

Issue 444813002: Remove BrowserPlugin's -internal-attach method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comment Created 6 years, 4 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/browser_plugin/browser_plugin_embedder.cc
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc
index 1593b59fd9f1f6d747cd8591ec254d6d3a1914c0..da6033cc257ff8137e2bdb00c4b03ab0e96786cc 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -116,28 +116,31 @@ void BrowserPluginEmbedder::OnUpdateDragCursor(bool* handled) {
}
void BrowserPluginEmbedder::OnGuestCallback(
- int instance_id,
+ int browser_plugin_instance_id,
const BrowserPluginHostMsg_Attach_Params& params,
- const base::DictionaryValue* extra_params,
WebContents* guest_web_contents) {
BrowserPluginGuest* guest = guest_web_contents ?
static_cast<WebContentsImpl*>(guest_web_contents)->
GetBrowserPluginGuest() : NULL;
if (guest)
- guest->Attach(GetWebContents(), params, *extra_params);
+ guest->Attach(browser_plugin_instance_id, GetWebContents(), params);
}
void BrowserPluginEmbedder::OnAttach(
- int instance_id,
- const BrowserPluginHostMsg_Attach_Params& params,
- const base::DictionaryValue& extra_params) {
+ int browser_plugin_instance_id,
+ const BrowserPluginHostMsg_Attach_Params& params) {
+ int embedder_render_process_id =
+ GetWebContents()->GetRenderProcessHost()->GetID();
+ int guest_instance_id =
+ GetBrowserPluginGuestManager()->GetGuestInstanceIDForPluginID(
+ GetWebContents(), browser_plugin_instance_id);
GetBrowserPluginGuestManager()->MaybeGetGuestByInstanceIDOrKill(
- instance_id, GetWebContents()->GetRenderProcessHost()->GetID(),
+ guest_instance_id,
+ embedder_render_process_id,
base::Bind(&BrowserPluginEmbedder::OnGuestCallback,
base::Unretained(this),
- instance_id,
- params,
- &extra_params));
+ browser_plugin_instance_id,
+ params));
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698