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

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

Issue 261013005: BrowserPlugin: Move CreateGuest to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_simplify_api
Patch Set: Removed AddGuest/RemoveGuest from content API! w00t! Created 6 years, 8 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_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index ad2e1f3beca21f9d28cfb03c99bf91b1361668ef..c720f923f43be54b0a3941426f14348c04eaead1 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -221,7 +221,6 @@ BrowserPluginGuest::BrowserPluginGuest(
weak_ptr_factory_(this) {
DCHECK(web_contents);
web_contents->SetDelegate(this);
- GetBrowserPluginGuestManager()->AddGuest(instance_id_, GetWebContents());
}
bool BrowserPluginGuest::AddMessageToConsole(WebContents* source,
@@ -325,10 +324,13 @@ BrowserPluginGuest* BrowserPluginGuest::CreateNewGuestWindow(
// embedder exposes the same API for this guest as its opener.
scoped_ptr<base::DictionaryValue> extra_params(
extra_attach_params_->DeepCopy());
+ StorageInfo storage_info;
+ storage_info.partition_id = attach_params.storage_partition_id;
+ storage_info.persist = attach_params.persist_storage;
BrowserPluginGuest* new_guest =
guest_manager->CreateGuest(GetWebContents()->GetSiteInstance(),
instance_id,
- attach_params,
+ storage_info,
extra_params.Pass());
if (new_guest->delegate_)
new_guest->delegate_->SetOpener(GetWebContents());
@@ -360,7 +362,6 @@ void BrowserPluginGuest::Destroy() {
if (!attached() && GetOpener())
GetOpener()->pending_new_windows_.erase(this);
DestroyUnattachedWindows();
- GetBrowserPluginGuestManager()->RemoveGuest(instance_id_);
delete GetWebContents();
}

Powered by Google App Engine
This is Rietveld 408576698