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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 1733463004: PlzNavigate: notify a WebUI of RVH creation when it is commited at creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 navigation_rfh = speculative_render_frame_host_.get(); 878 navigation_rfh = speculative_render_frame_host_.get();
879 879
880 // Check if our current RFH is live. 880 // Check if our current RFH is live.
881 if (!render_frame_host_->IsRenderFrameLive()) { 881 if (!render_frame_host_->IsRenderFrameLive()) {
882 // The current RFH is not live. There's no reason to sit around with a 882 // The current RFH is not live. There's no reason to sit around with a
883 // sad tab or a newly created RFH while we wait for the navigation to 883 // sad tab or a newly created RFH while we wait for the navigation to
884 // complete. Just switch to the speculative RFH now and go back to normal. 884 // complete. Just switch to the speculative RFH now and go back to normal.
885 // (Note that we don't care about on{before}unload handlers if the current 885 // (Note that we don't care about on{before}unload handlers if the current
886 // RFH isn't live.) 886 // RFH isn't live.)
887 CommitPending(); 887 CommitPending();
888
889 // Notify the WebUI of the creation of the RenderView if needed (the
890 // newly created WebUI has just been committed by CommitPending, so
891 // GetNavigatingWebUI() below will return false).
892 if (notify_webui_of_rv_creation && render_frame_host_->web_ui()) {
893 render_frame_host_->web_ui()->RenderViewCreated(
894 render_frame_host_->render_view_host());
895 notify_webui_of_rv_creation = false;
896 }
888 } 897 }
889 } 898 }
890 DCHECK(navigation_rfh && 899 DCHECK(navigation_rfh &&
891 (navigation_rfh == render_frame_host_.get() || 900 (navigation_rfh == render_frame_host_.get() ||
892 navigation_rfh == speculative_render_frame_host_.get())); 901 navigation_rfh == speculative_render_frame_host_.get()));
893 902
894 // If the RenderFrame that needs to navigate is not live (its process was just 903 // If the RenderFrame that needs to navigate is not live (its process was just
895 // created or has crashed), initialize it. 904 // created or has crashed), initialize it.
896 if (!navigation_rfh->IsRenderFrameLive()) { 905 if (!navigation_rfh->IsRenderFrameLive()) {
897 // Recreate the opener chain. 906 // Recreate the opener chain.
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { 2518 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) {
2510 if (!frame_tree_node_->opener()) 2519 if (!frame_tree_node_->opener())
2511 return MSG_ROUTING_NONE; 2520 return MSG_ROUTING_NONE;
2512 2521
2513 return frame_tree_node_->opener() 2522 return frame_tree_node_->opener()
2514 ->render_manager() 2523 ->render_manager()
2515 ->GetRoutingIdForSiteInstance(instance); 2524 ->GetRoutingIdForSiteInstance(instance);
2516 } 2525 }
2517 2526
2518 } // namespace content 2527 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698