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

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

Issue 1352813006: Move WebUI ownership from the RenderFrameHostManager to the RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More test fixes and improvements but the code is stil a WIP! Created 5 years, 3 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 78689f2f694ead9c86e9618ce32b762feadb76b4..78e61388262c647417a948700eb0d48befdca735 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3781,17 +3781,18 @@ void WebContentsImpl::RenderViewCreated(RenderViewHost* render_view_host) {
Source<WebContents>(this),
Details<RenderViewHost>(render_view_host));
- // When we're creating views, we're still doing initial setup, so we always
- // use the pending Web UI rather than any possibly existing committed one.
- if (GetRenderManager()->pending_web_ui())
- GetRenderManager()->pending_web_ui()->RenderViewCreated(render_view_host);
-
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBrowserSideNavigation) &&
- GetRenderManager()->speculative_web_ui()) {
- GetRenderManager()->speculative_web_ui()->RenderViewCreated(
- render_view_host);
- }
+ // TODO(carlosk): I'm testing moving this into RenderFrameHostImpl::InitializeWebUI
nasko 2015/09/18 18:40:19 This code doesn't really belong here, as WebConten
carlosk 2015/09/30 19:37:27 Acknowledged and done.
+ // // When we're creating views, we're still doing initial setup, so we always
+ // // use the pending Web UI rather than any possibly existing committed one.
+ // if (GetRenderManager()->pending_web_ui())
+ // GetRenderManager()->pending_web_ui()->RenderViewCreated(render_view_host);
+
+ // if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ // switches::kEnableBrowserSideNavigation) &&
+ // GetRenderManager()->speculative_web_ui()) {
+ // GetRenderManager()->speculative_web_ui()->RenderViewCreated(
+ // render_view_host);
+ // }
NavigationEntry* entry = controller_.GetPendingEntry();
if (entry && entry->IsViewSourceMode()) {
@@ -4180,7 +4181,7 @@ int WebContentsImpl::CreateSwappedOutRenderView(
GetRenderManager()->CreateRenderFrameProxy(instance);
} else {
GetRenderManager()->CreateRenderFrame(
- instance, nullptr, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN,
+ instance, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN,
&render_view_routing_id);
}
return render_view_routing_id;

Powered by Google App Engine
This is Rietveld 408576698