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

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

Issue 336283002: Remove GuestWebContentsCreated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simplify_creation
Patch Set: Merge with ToT Created 6 years, 6 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
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2dd5a8c5656636e81c0b1badbc9721027901ea9b..064052ef1b5bc77e6e5cfb07c09002bd6fed33c9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -440,17 +440,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;
@@ -1429,15 +1424,15 @@ 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);
}
- WebContentsImpl* new_contents = static_cast<WebContentsImpl*>(
- WebContents::Create(create_params));
new_contents->GetController().SetSessionStorageNamespace(
partition_id,
session_storage_namespace);
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698