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

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

Issue 1608283002: PlzNavigate: Use WebNavigationPolicyHandledByClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@change-did-start-loading-logic
Patch Set: Addressed comments 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
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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 NavigationRequest* ongoing_navigation_request = 769 NavigationRequest* ongoing_navigation_request =
770 frame_tree_node->navigation_request(); 770 frame_tree_node->navigation_request();
771 771
772 // The renderer-initiated navigation request is ignored iff a) there is an 772 // The renderer-initiated navigation request is ignored iff a) there is an
773 // ongoing request b) which is browser or user-initiated and c) the renderer 773 // ongoing request b) which is browser or user-initiated and c) the renderer
774 // request is not user-initiated. 774 // request is not user-initiated.
775 if (ongoing_navigation_request && 775 if (ongoing_navigation_request &&
776 (ongoing_navigation_request->browser_initiated() || 776 (ongoing_navigation_request->browser_initiated() ||
777 ongoing_navigation_request->begin_params().has_user_gesture) && 777 ongoing_navigation_request->begin_params().has_user_gesture) &&
778 !begin_params.has_user_gesture) { 778 !begin_params.has_user_gesture) {
779 RenderFrameHost* current_frame_host =
780 frame_tree_node->render_manager()->current_frame_host();
781 current_frame_host->Send(
782 new FrameMsg_Stop(current_frame_host->GetRoutingID()));
779 return; 783 return;
780 } 784 }
781 785
782 // In all other cases the current navigation, if any, is canceled and a new 786 // In all other cases the current navigation, if any, is canceled and a new
783 // NavigationRequest is created for the node. 787 // NavigationRequest is created for the node.
784 frame_tree_node->CreatedNavigationRequest( 788 frame_tree_node->CreatedNavigationRequest(
785 NavigationRequest::CreateRendererInitiated( 789 NavigationRequest::CreateRendererInitiated(
786 frame_tree_node, common_params, begin_params, body, 790 frame_tree_node, common_params, begin_params, body,
787 controller_->GetLastCommittedEntryIndex(), 791 controller_->GetLastCommittedEntryIndex(),
788 controller_->GetEntryCount())); 792 controller_->GetEntryCount()));
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 1056 entry->set_should_replace_entry(pending_entry->should_replace_entry());
1053 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 1057 entry->SetRedirectChain(pending_entry->GetRedirectChain());
1054 } 1058 }
1055 controller_->SetPendingEntry(std::move(entry)); 1059 controller_->SetPendingEntry(std::move(entry));
1056 if (delegate_) 1060 if (delegate_)
1057 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1061 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1058 } 1062 }
1059 } 1063 }
1060 1064
1061 } // namespace content 1065 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698