| Index: content/browser/browser_plugin/browser_plugin_embedder.cc
|
| diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc
|
| index 091c00c90b0bb8c400514743bb4431de4d7e1599..d92ba0d28fbe2d9e23ccd51ae0d8cb9ea33f7711 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_embedder.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
|
| @@ -109,6 +109,14 @@ void BrowserPluginEmbedder::CreateGuest(RenderViewHost* render_view_host,
|
| guest_renderer_prefs->throttle_input_events = false;
|
| AddGuest(instance_id, guest_web_contents);
|
| guest_web_contents->SetDelegate(guest);
|
| +
|
| + // 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 =
|
| + static_cast<WebContentsImpl*>(guest->GetWebContents())->
|
| + CreateSwappedOutRenderView(web_contents()->GetSiteInstance());
|
| + render_view_host->Send(new BrowserPluginMsg_GuestContentWindowReady(
|
| + instance_id, guest_routing_id));
|
| }
|
|
|
| void BrowserPluginEmbedder::NavigateGuest(
|
| @@ -130,7 +138,7 @@ void BrowserPluginEmbedder::NavigateGuest(
|
| if (!src.empty()) {
|
| guest_web_contents->GetController().LoadURL(url,
|
| Referrer(),
|
| - PAGE_TRANSITION_AUTO_SUBFRAME,
|
| + PAGE_TRANSITION_AUTO_TOPLEVEL,
|
| std::string());
|
| }
|
|
|
| @@ -242,7 +250,6 @@ void BrowserPluginEmbedder::DestroyGuestByInstanceID(int instance_id) {
|
|
|
| void BrowserPluginEmbedder::RenderViewDeleted(
|
| RenderViewHost* render_view_host) {
|
| - DestroyGuests();
|
| }
|
|
|
| void BrowserPluginEmbedder::RenderViewGone(base::TerminationStatus status) {
|
|
|