| 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 1c0df05c942df80066710c2447d21e5c0403765c..7a005a97722a6a52bafcd4461fb1062f0ca99f7f 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_embedder.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
|
| @@ -25,6 +25,7 @@
|
| #include "net/base/escape.h"
|
| #include "ui/events/keycodes/keyboard_codes.h"
|
|
|
| +
|
| namespace content {
|
|
|
| // static
|
| @@ -106,8 +107,6 @@ void BrowserPluginEmbedder::SetZoomLevel(double level) {
|
| bool BrowserPluginEmbedder::OnMessageReceived(const IPC::Message& message) {
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(BrowserPluginEmbedder, message)
|
| - IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_AllocateInstanceID,
|
| - OnAllocateInstanceID)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Attach, OnAttach)
|
| IPC_MESSAGE_HANDLER_GENERIC(DragHostMsg_UpdateDragCursor,
|
| OnUpdateDragCursor(&handled));
|
| @@ -140,12 +139,6 @@ void BrowserPluginEmbedder::OnUpdateDragCursor(bool* handled) {
|
| *handled = (guest_dragging_over_.get() != NULL);
|
| }
|
|
|
| -void BrowserPluginEmbedder::OnAllocateInstanceID(int request_id) {
|
| - int instance_id = GetBrowserPluginGuestManager()->GetNextInstanceID();
|
| - Send(new BrowserPluginMsg_AllocateInstanceID_ACK(
|
| - routing_id(), request_id, instance_id));
|
| -}
|
| -
|
| void BrowserPluginEmbedder::OnGuestCallback(
|
| int instance_id,
|
| const BrowserPluginHostMsg_Attach_Params& params,
|
| @@ -155,6 +148,7 @@ void BrowserPluginEmbedder::OnGuestCallback(
|
| static_cast<WebContentsImpl*>(guest_web_contents)->
|
| GetBrowserPluginGuest() : NULL;
|
| if (guest) {
|
| + printf("OnGuestCallback, guest non NULL\n");
|
| // There is an implicit order expectation here:
|
| // 1. The content embedder is made aware of the attachment.
|
| // 2. BrowserPluginGuest::Attach is called.
|
| @@ -167,13 +161,12 @@ void BrowserPluginEmbedder::OnGuestCallback(
|
| guest->Attach(GetWebContents(), params, *extra_params);
|
| return;
|
| }
|
| + printf("OnGuestCallback, guest NULL\n");
|
|
|
| scoped_ptr<base::DictionaryValue> copy_extra_params(extra_params->DeepCopy());
|
| guest_web_contents = GetBrowserPluginGuestManager()->CreateGuest(
|
| GetWebContents()->GetSiteInstance(),
|
| instance_id,
|
| - params.storage_partition_id,
|
| - params.persist_storage,
|
| copy_extra_params.Pass());
|
| guest = guest_web_contents ?
|
| static_cast<WebContentsImpl*>(guest_web_contents)->
|
| @@ -183,7 +176,7 @@ void BrowserPluginEmbedder::OnGuestCallback(
|
| guest->GetWebContents(),
|
| GetWebContents(),
|
| *extra_params);
|
| - guest->Initialize(params, GetWebContents());
|
| + guest->Initialize(params, GetWebContents(), *extra_params);
|
| }
|
| }
|
|
|
|
|