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

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: 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 NavigationRequest* ongoing_navigation_request = 755 NavigationRequest* ongoing_navigation_request =
756 frame_tree_node->navigation_request(); 756 frame_tree_node->navigation_request();
757 757
758 // The renderer-initiated navigation request is ignored iff a) there is an 758 // The renderer-initiated navigation request is ignored iff a) there is an
759 // ongoing request b) which is browser or user-initiated and c) the renderer 759 // ongoing request b) which is browser or user-initiated and c) the renderer
760 // request is not user-initiated. 760 // request is not user-initiated.
761 if (ongoing_navigation_request && 761 if (ongoing_navigation_request &&
762 (ongoing_navigation_request->browser_initiated() || 762 (ongoing_navigation_request->browser_initiated() ||
763 ongoing_navigation_request->begin_params().has_user_gesture) && 763 ongoing_navigation_request->begin_params().has_user_gesture) &&
764 !begin_params.has_user_gesture) { 764 !begin_params.has_user_gesture) {
765 RenderFrameHost* current_frame_host =
766 frame_tree_node->render_manager()->current_frame_host();
767 current_frame_host->Send(
768 new FrameMsg_Stop(current_frame_host->GetRoutingID()));
765 return; 769 return;
766 } 770 }
767 771
768 // In all other cases the current navigation, if any, is canceled and a new 772 // In all other cases the current navigation, if any, is canceled and a new
769 // NavigationRequest is created for the node. 773 // NavigationRequest is created for the node.
770 frame_tree_node->CreatedNavigationRequest( 774 frame_tree_node->CreatedNavigationRequest(
771 NavigationRequest::CreateRendererInitiated( 775 NavigationRequest::CreateRendererInitiated(
772 frame_tree_node, common_params, begin_params, body, 776 frame_tree_node, common_params, begin_params, body,
773 controller_->GetLastCommittedEntryIndex(), 777 controller_->GetLastCommittedEntryIndex(),
774 controller_->GetEntryCount())); 778 controller_->GetEntryCount()));
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 1042 entry->set_should_replace_entry(pending_entry->should_replace_entry());
1039 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 1043 entry->SetRedirectChain(pending_entry->GetRedirectChain());
1040 } 1044 }
1041 controller_->SetPendingEntry(std::move(entry)); 1045 controller_->SetPendingEntry(std::move(entry));
1042 if (delegate_) 1046 if (delegate_)
1043 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1047 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1044 } 1048 }
1045 } 1049 }
1046 1050
1047 } // namespace content 1051 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698