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

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

Issue 1889583003: Revert of OOPIF: Fix subframe back/forward after recreating FTNs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 429
430 bool NavigatorImpl::NavigateNewChildFrame( 430 bool NavigatorImpl::NavigateNewChildFrame(
431 RenderFrameHostImpl* render_frame_host, 431 RenderFrameHostImpl* render_frame_host,
432 const std::string& unique_name) { 432 const std::string& unique_name) {
433 NavigationEntryImpl* entry = 433 NavigationEntryImpl* entry =
434 controller_->GetEntryWithUniqueID(render_frame_host->nav_entry_id()); 434 controller_->GetEntryWithUniqueID(render_frame_host->nav_entry_id());
435 if (!entry) 435 if (!entry)
436 return false; 436 return false;
437 437
438 // TODO(creis): Remove unique_name from the IPC, now that we can rely on the
439 // replication state.
440 DCHECK_EQ(render_frame_host->frame_tree_node()
441 ->current_replication_state()
442 .unique_name,
443 unique_name);
444 FrameNavigationEntry* frame_entry = 438 FrameNavigationEntry* frame_entry =
445 entry->GetFrameEntry(render_frame_host->frame_tree_node()); 439 entry->GetFrameEntryByUniqueName(unique_name);
446 if (!frame_entry) 440 if (!frame_entry)
447 return false; 441 return false;
448 442
443 // Update the FrameNavigationEntry's FrameTreeNode ID (which is currently the
444 // ID of the old FrameTreeNode that no longer exists) to be the ID of the
445 // newly created frame.
446 frame_entry->set_frame_tree_node_id(
447 render_frame_host->frame_tree_node()->frame_tree_node_id());
448
449 return NavigateToEntry(render_frame_host->frame_tree_node(), *frame_entry, 449 return NavigateToEntry(render_frame_host->frame_tree_node(), *frame_entry,
450 *entry, NavigationControllerImpl::NO_RELOAD, false, 450 *entry, NavigationControllerImpl::NO_RELOAD, false,
451 false); 451 false);
452 } 452 }
453 453
454 void NavigatorImpl::DidNavigate( 454 void NavigatorImpl::DidNavigate(
455 RenderFrameHostImpl* render_frame_host, 455 RenderFrameHostImpl* render_frame_host,
456 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) { 456 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
457 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree(); 457 FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree();
458 bool oopifs_possible = SiteIsolationPolicy::AreCrossProcessFramesPossible(); 458 bool oopifs_possible = SiteIsolationPolicy::AreCrossProcessFramesPossible();
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 if (pending_entry != controller_->GetVisibleEntry() || 1090 if (pending_entry != controller_->GetVisibleEntry() ||
1091 !should_preserve_entry) { 1091 !should_preserve_entry) {
1092 controller_->DiscardPendingEntry(true); 1092 controller_->DiscardPendingEntry(true);
1093 1093
1094 // Also force the UI to refresh. 1094 // Also force the UI to refresh.
1095 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1095 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1096 } 1096 }
1097 } 1097 }
1098 1098
1099 } // namespace content 1099 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698