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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge with ToT. GuestToEmbedderChannel is now Dispatcher. Created 8 years, 7 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 | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/browser_plugin_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e8da542cbb626f156508f5b67334aa004b30d711..516c2764603e35890b0394e8c9b0c65f1876e5f3 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -14,7 +14,7 @@
#include "base/string_util.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
-#include "content/browser/browser_plugin/browser_plugin_web_contents_observer.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"
@@ -328,8 +328,7 @@ WebContentsImpl::WebContentsImpl(
new JavaBridgeDispatcherHostManager(this));
#endif
- browser_plugin_web_contents_observer_.reset(
- new content::BrowserPluginWebContentsObserver(this));
+ browser_plugin_host_.reset(new content::BrowserPluginHost(this));
}
WebContentsImpl::~WebContentsImpl() {
@@ -670,10 +669,20 @@ content::RenderProcessHost* WebContentsImpl::GetRenderProcessHost() const {
return host ? host->GetProcess() : NULL;
}
+content::RenderProcessHost*
+ WebContentsImpl::GetPendingRenderProcessHost() const {
+ RenderViewHostImpl* host = render_manager_.pending_render_view_host();
+ return host ? host->GetProcess() : NULL;
+}
+
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();
}
@@ -2672,9 +2681,19 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
int32 max_page_id =
GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance());
+ int embedder_process_id = 0;
+ int embedder_routing_id = 0;
+ WebContentsImpl* embedder = browser_plugin_host()->embedder();
+ if (embedder) {
+ embedder_process_id = embedder->GetRenderProcessHost()->GetID();
+ embedder_routing_id = embedder->GetRenderViewHost()->GetRoutingID();
+ }
if (!static_cast<RenderViewHostImpl*>(
- render_view_host)->CreateRenderView(string16(), opener_route_id,
- max_page_id)) {
+ render_view_host)->CreateRenderView(string16(),
+ opener_route_id,
+ max_page_id,
+ embedder_process_id,
+ embedder_routing_id)) {
return false;
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/browser_plugin_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698