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

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

Issue 564973004: Move ContentWindow from BrowserPlugin To GuestView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup Created 6 years, 3 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 | « no previous file | content/common/browser_plugin/browser_plugin_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 847eff8c2c661d9d5ad3f9d988a4f9d664f08cdb..9fd8e8dd929f503425af7fb99d48bd2e377b6cce 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -238,12 +238,6 @@ void BrowserPluginGuest::Initialize(
OnResizeGuest(browser_plugin_instance_id_, params.resize_guest_params);
- // Create a swapped out RenderView for the guest in the embedder render
- // process, so that the embedder can access the guest's window object.
- int guest_routing_id =
- GetWebContents()->CreateSwappedOutRenderView(
- embedder_web_contents_->GetSiteInstance());
-
// TODO(chrishtr): this code is wrong. The navigate_on_drag_drop field will
// be reset again the next time preferences are updated.
WebPreferences prefs =
@@ -262,9 +256,6 @@ void BrowserPluginGuest::Initialize(
// Inform the embedder of the guest's attachment.
SendMessageToEmbedder(
new BrowserPluginMsg_Attach_ACK(browser_plugin_instance_id_));
-
- SendMessageToEmbedder(new BrowserPluginMsg_GuestContentWindowReady(
- browser_plugin_instance_id_, guest_routing_id));
}
BrowserPluginGuest::~BrowserPluginGuest() {
@@ -558,7 +549,7 @@ void BrowserPluginGuest::Attach(
if (attached())
return;
- delegate_->WillAttach(embedder_web_contents);
+ delegate_->WillAttach(embedder_web_contents, browser_plugin_instance_id);
// 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
@@ -575,7 +566,13 @@ void BrowserPluginGuest::Attach(
SendQueuedMessages();
- delegate_->DidAttach();
+ // Create a swapped out RenderView for the guest in the embedder render
+ // process, so that the embedder can access the guest's window object.
+ int guest_routing_id =
+ GetWebContents()->CreateSwappedOutRenderView(
+ embedder_web_contents_->GetSiteInstance());
+
+ delegate_->DidAttach(guest_routing_id);
RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Attached"));
}
« no previous file with comments | « no previous file | content/common/browser_plugin/browser_plugin_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698