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

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

Issue 10829225: Browser Plugin: Add HTML5-like postMessage support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 2 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/browser/browser_plugin/browser_plugin_host_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7adbe2b7cde5dd83c8d7499a108d040375f609c9..7aa5a2f7d7ae2efd2a6fb4c94346933b091a6102 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -110,6 +110,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(
@@ -132,7 +140,7 @@ void BrowserPluginEmbedder::NavigateGuest(
// TODO(creis): Check the validity of the URL: http://crbug.com/139397.
guest_web_contents->GetController().LoadURL(url,
Referrer(),
- PAGE_TRANSITION_AUTO_SUBFRAME,
+ PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
}
@@ -244,7 +252,6 @@ void BrowserPluginEmbedder::DestroyGuestByInstanceID(int instance_id) {
void BrowserPluginEmbedder::RenderViewDeleted(
RenderViewHost* render_view_host) {
- DestroyGuests();
}
void BrowserPluginEmbedder::RenderViewGone(base::TerminationStatus status) {
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698