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

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

Issue 281653003: DRAFT CL: Add FrameNavigationEntry and track subframe session histories. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 5 years, 9 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 8dd4307ff3f92548ebead500cf6c375d193c2f08..5beadb72678ca09da0c11e2c32aff5dbc2ee867c 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2036,26 +2036,6 @@ bool WebContentsImpl::Send(IPC::Message* message) {
return GetRenderViewHost()->Send(message);
}
-bool WebContentsImpl::NavigateToPendingEntry(
- NavigationController::ReloadType reload_type) {
- FrameTreeNode* node = frame_tree_.root();
-
- // Navigate in the FrameTreeNode specified in the pending entry, if any. This
- // is currently only used in --site-per-process and tests.
- // TODO(creis): Remove this method and NavigationEntryImpl::frame_tree_node_id
- // by using FrameNavigationEntries instead. See https://crbug.com/236848.
- NavigationEntryImpl* pending_entry = controller_.GetPendingEntry();
- if (pending_entry->frame_tree_node_id() != -1) {
- FrameTreeNode* subframe =
- frame_tree_.FindByID(pending_entry->frame_tree_node_id());
- DCHECK(subframe);
- if (subframe)
- node = subframe;
- }
-
- return node->navigator()->NavigateToPendingEntry(node, reload_type);
-}
-
void WebContentsImpl::RenderFrameForInterstitialPageCreated(
RenderFrameHost* render_frame_host) {
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
@@ -2631,6 +2611,10 @@ void WebContentsImpl::SetFocusToLocationBar(bool select_all) {
delegate_->SetFocusToLocationBar(select_all);
}
+FrameTreeNode* WebContentsImpl::GetFrameTreeRoot() {
+ return frame_tree_.root();
+}
+
void WebContentsImpl::DidStartProvisionalLoad(
RenderFrameHostImpl* render_frame_host,
const GURL& validated_url,
@@ -3868,8 +3852,7 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh,
// the next page. The navigation controller will look up the appropriate
// NavigationEntry and update it when it is notified via the delegate.
- int entry_index = controller_.GetEntryIndexWithPageID(
- rvh->GetSiteInstance(), page_id);
+ int entry_index = controller_.GetEntryIndexWithPageID(page_id);
if (entry_index < 0)
return;
NavigationEntry* entry = controller_.GetEntryAtIndex(entry_index);
@@ -4045,8 +4028,7 @@ void WebContentsImpl::UpdateTitle(RenderFrameHost* render_frame_host,
// Try to find the navigation entry, which might not be the current one.
// For example, it might be from a pending RVH for the pending entry.
- NavigationEntryImpl* entry = controller_.GetEntryWithPageID(
- rvh->GetSiteInstance(), page_id);
+ NavigationEntryImpl* entry = controller_.GetEntryWithPageID(page_id);
// We can handle title updates when we don't have an entry in
// UpdateTitleForEntry, but only if the update is from the current RVH.
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698