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 196095ab2a23d2595b26b7523ccfeb094db0ab9c..e936a0f74fb9e1c9dd8f4480bd833bdcf0593e35 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -14,6 +14,7 @@ |
#include "base/string_util.h" |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
+#include "content/browser/browser_plugin/browser_plugin_host.h" |
#include "content/browser/child_process_security_policy_impl.h" |
#include "content/browser/debugger/devtools_manager_impl.h" |
#include "content/browser/dom_storage/session_storage_namespace_impl.h" |
@@ -326,6 +327,8 @@ WebContentsImpl::WebContentsImpl( |
java_bridge_dispatcher_host_manager_.reset( |
new JavaBridgeDispatcherHostManager(this)); |
#endif |
+ |
+ browser_plugin_host_.reset(new content::BrowserPluginHost(this)); |
} |
WebContentsImpl::~WebContentsImpl() { |
@@ -671,6 +674,10 @@ RenderViewHost* WebContentsImpl::GetRenderViewHost() const { |
return render_manager_.current_host(); |
} |
+RenderViewHost* WebContentsImpl::GetPendingRenderViewHost() const { |
+ return render_manager_.pending_render_view_host(); |
+} |
+ |
RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { |
return render_manager_.GetRenderWidgetHostView(); |
} |
@@ -2713,11 +2720,14 @@ bool WebContentsImpl::CreateRenderViewForRenderManager( |
int32 max_page_id = |
GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); |
+ WebContentsImpl* embedder = browser_plugin_host()->embedder(); |
+ int embedder_process_id = |
+ embedder ? embedder->GetRenderProcessHost()->GetID() : -1; |
if (!static_cast<RenderViewHostImpl*>( |
render_view_host)->CreateRenderView(string16(), |
opener_route_id, |
max_page_id, |
- -1)) { |
+ embedder_process_id)) { |
return false; |
} |