Chromium Code Reviews| Index: content/browser/browser_plugin/browser_plugin_guest.cc |
| diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc |
| index 03faef23a9bbcd578e7fb1c3e8dc417456d8dd2e..4ed7a918fa72ac339e4a2715b5b79df9acf01dec 100644 |
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc |
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc |
| @@ -174,7 +174,9 @@ bool BrowserPluginGuest::OnMessageReceivedFromEmbedder( |
| void BrowserPluginGuest::Initialize( |
| const BrowserPluginHostMsg_Attach_Params& params, |
| - WebContentsImpl* embedder_web_contents) { |
| + WebContentsImpl* embedder_web_contents, |
| + const base::DictionaryValue& extra_params) { |
| + printf("BPG::Initialize()\n"); |
| focused_ = params.focused; |
| guest_visible_ = params.visible; |
| guest_opaque_ = params.opaque; |
| @@ -227,12 +229,6 @@ void BrowserPluginGuest::Initialize( |
| new BrowserPluginMsg_GuestContentWindowReady(instance_id_, |
| guest_routing_id)); |
| - if (!params.src.empty()) { |
| - // params.src will be validated in BrowserPluginGuest::OnNavigateGuest. |
| - OnNavigateGuest(instance_id_, params.src); |
|
Fady Samuel
2014/05/29 20:35:23
We probably get rid of the IPC message and the met
lazyboy
2014/05/30 05:48:21
Done.
|
| - has_render_view_ = true; |
| - } |
| - |
| WebPreferences prefs = GetWebContents()->GetWebkitPrefs(); |
| prefs.navigate_on_drag_drop = false; |
| GetWebContents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs); |
| @@ -256,8 +252,11 @@ void BrowserPluginGuest::Initialize( |
| SendMessageToEmbedder( |
| new BrowserPluginMsg_Attach_ACK(instance_id_, ack_params)); |
| - if (delegate_) |
| - delegate_->DidAttach(); |
| + if (delegate_) { |
| + delegate_->DidAttach(extra_params); |
| + // TODO(lazyboy): Should not set this if src is empty. |
|
Fady Samuel
2014/05/29 20:35:23
In theory it should always be the case that we've
lazyboy
2014/05/30 05:48:21
Removed TODO.
|
| + has_render_view_ = true; |
| + } |
| } |
| BrowserPluginGuest::~BrowserPluginGuest() { |
| @@ -553,11 +552,6 @@ void BrowserPluginGuest::Attach( |
| if (attached()) |
| return; |
| - // Clear parameters that get inherited from the opener. |
| - params.storage_partition_id.clear(); |
| - params.persist_storage = false; |
| - params.src.clear(); |
| - |
| // If a RenderView has already been created for this new window, then we need |
| // to initialize the browser-side state now so that the RenderFrameHostManager |
| // does not create a new RenderView on navigation. |
| @@ -569,7 +563,7 @@ void BrowserPluginGuest::Attach( |
| new_view->CreateViewForWidget(web_contents()->GetRenderViewHost()); |
| } |
| - Initialize(params, embedder_web_contents); |
| + Initialize(params, embedder_web_contents, extra_params); |
| SendQueuedMessages(); |
|
Fady Samuel
2014/05/29 20:35:23
I don't think we need a separate BrowserPluginGues
lazyboy
2014/05/30 05:48:21
I've made BPEmbedder always call Attach, and made
|