Chromium Code Reviews| 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 9f6ead2c45afab29758b3f8eebdc4f99dd38a2de..07f6c9029ab2991cc0e3c1c92c193f3e0b6d031c 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -438,17 +438,12 @@ WebContentsImpl* WebContentsImpl::CreateWithOpener( |
| WebContentsImpl* new_contents = new WebContentsImpl( |
| params.browser_context, params.opener_suppressed ? NULL : opener); |
| - if (params.guest_instance_id) { |
| - scoped_ptr<base::DictionaryValue> extra_params; |
| - if (params.guest_extra_params) |
| - extra_params.reset(params.guest_extra_params->DeepCopy()); |
| + if (params.guest_delegate) { |
| // This makes |new_contents| act as a guest. |
| // For more info, see comment above class BrowserPluginGuest. |
| - BrowserPluginGuest::Create(params.guest_instance_id, |
| - params.site_instance, |
| + BrowserPluginGuest::Create(params.guest_delegate->GetGuestInstanceID(), |
| new_contents, |
| - extra_params.Pass(), |
| - opener ? opener->GetBrowserPluginGuest() : NULL); |
| + params.guest_delegate); |
| // We are instantiating a WebContents for browser plugin. Set its subframe |
| // bit to true. |
| new_contents->is_subframe_ = true; |
| @@ -1422,15 +1417,16 @@ void WebContentsImpl::CreateNewWindow( |
| if (params.disposition == NEW_BACKGROUND_TAB) |
| create_params.initially_hidden = true; |
| + WebContentsImpl* new_contents = NULL; |
| if (!is_guest) { |
| create_params.context = view_->GetNativeView(); |
| create_params.initial_size = GetContainerBounds().size(); |
| - } else { |
| - create_params.guest_instance_id = |
| - GetBrowserContext()->GetGuestManager()->GetNextInstanceID(); |
| + new_contents = static_cast<WebContentsImpl*>( |
| + WebContents::Create(create_params)); |
| + } else { |
| + new_contents = GetBrowserPluginGuest()->CreateNewGuestWindow( |
| + &create_params); |
|
lazyboy
2014/06/17 23:46:46
|create_params| being a (mutable) pointer to Creat
Fady Samuel
2014/06/18 21:08:34
Done.
|
| } |
| - WebContentsImpl* new_contents = static_cast<WebContentsImpl*>( |
| - WebContents::Create(create_params)); |
| new_contents->GetController().SetSessionStorageNamespace( |
|
lazyboy
2014/06/17 23:46:46
DCHECK(new_contents)
Fady Samuel
2014/06/18 21:08:34
Unnecessary. We will always segfault here.
|
| partition_id, |
| session_storage_namespace); |