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

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: Simplified the code mainly by consolidating WebUIImpl::RenderView* calls. Created 5 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
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 4802886938a4dc9816d57cf2cbdd3b68a40deca7..8d18a06754553d60b1b279a20194d6dc57cde67b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3768,18 +3768,6 @@ 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);
- }
-
NavigationEntry* entry = controller_.GetPendingEntry();
if (entry && entry->IsViewSourceMode()) {
// Put the renderer in view source mode.
@@ -4167,7 +4155,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;
@@ -4329,7 +4317,7 @@ NavigationControllerImpl& WebContentsImpl::GetControllerForRenderManager() {
return GetController();
}
-scoped_ptr<WebUIImpl> WebContentsImpl::CreateWebUIForRenderManager(
+scoped_ptr<WebUIImpl> WebContentsImpl::CreateWebUIForRenderFrameHost(
const GURL& url) {
return scoped_ptr<WebUIImpl>(static_cast<WebUIImpl*>(CreateWebUI(
url, std::string())));

Powered by Google App Engine
This is Rietveld 408576698