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

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

Issue 10377170: Browser Plugin: browser process side changes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated to not expose GetPendingRenderViewHost 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
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 b19ed132ec868c96491889c734356f1a7a4a1d8c..0f8f745313af8a1b07e36f071ee274f390c8d714 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() {
@@ -1129,6 +1132,9 @@ bool WebContentsImpl::NavigateToEntry(
dest_render_view_host,
entry.GetURL());
+ // Tell BrowserPluginHost about the pending cross-process navigation.
+ browser_plugin_host()->OnCrossProcessNavigation(dest_render_view_host);
Charlie Reis 2012/05/17 21:24:05 Should avoid this.
Fady Samuel 2012/05/18 17:37:52 See TODO above BrowserPluginHost::OnMapInstance. I
Charlie Reis 2012/05/18 20:35:24 Please put a TODO here as well, since we can't kee
+
// Used for page load time metrics.
current_load_start_ = base::TimeTicks::Now();
@@ -2710,11 +2716,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;
}

Powered by Google App Engine
This is Rietveld 408576698