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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1608283002: PlzNavigate: Use WebNavigationPolicyHandledByClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@change-did-start-loading-logic
Patch Set: Rebase 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 4598 matching lines...) Expand 10 before | Expand all | Expand 10 after
4609 4609
4610 // If we end up reusing this WebRequest (for example, due to a #ref click), 4610 // If we end up reusing this WebRequest (for example, due to a #ref click),
4611 // we don't want the transition type to persist. Just clear it. 4611 // we don't want the transition type to persist. Just clear it.
4612 navigation_state->set_transition_type(ui::PAGE_TRANSITION_LINK); 4612 navigation_state->set_transition_type(ui::PAGE_TRANSITION_LINK);
4613 } 4613 }
4614 4614
4615 void RenderFrameImpl::didStartLoading(bool to_different_document) { 4615 void RenderFrameImpl::didStartLoading(bool to_different_document) {
4616 TRACE_EVENT1("navigation", "RenderFrameImpl::didStartLoading", 4616 TRACE_EVENT1("navigation", "RenderFrameImpl::didStartLoading",
4617 "id", routing_id_); 4617 "id", routing_id_);
4618 render_view_->FrameDidStartLoading(frame_); 4618 render_view_->FrameDidStartLoading(frame_);
4619 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document)); 4619
4620 // PlzNavigate: the browser is responsible for knowing the start of all
4621 // non-synchronous navigations.
4622 if (!IsBrowserSideNavigationEnabled() || !to_different_document)
4623 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document));
4620 } 4624 }
4621 4625
4622 void RenderFrameImpl::didStopLoading() { 4626 void RenderFrameImpl::didStopLoading() {
4623 TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading", 4627 TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading",
4624 "id", routing_id_); 4628 "id", routing_id_);
4625 render_view_->FrameDidStopLoading(frame_); 4629 render_view_->FrameDidStopLoading(frame_);
4626 Send(new FrameHostMsg_DidStopLoading(routing_id_)); 4630 Send(new FrameHostMsg_DidStopLoading(routing_id_));
4627 } 4631 }
4628 4632
4629 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { 4633 void RenderFrameImpl::didChangeLoadProgress(double load_progress) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
4905 return blink::WebNavigationPolicyIgnore; 4909 return blink::WebNavigationPolicyIgnore;
4906 } 4910 }
4907 4911
4908 // PlzNavigate: if the navigation is not synchronous, send it to the browser. 4912 // PlzNavigate: if the navigation is not synchronous, send it to the browser.
4909 // This includes navigations with no request being sent to the network stack. 4913 // This includes navigations with no request being sent to the network stack.
4910 if (IsBrowserSideNavigationEnabled() && 4914 if (IsBrowserSideNavigationEnabled() &&
4911 info.urlRequest.checkForBrowserSideNavigation() && 4915 info.urlRequest.checkForBrowserSideNavigation() &&
4912 ShouldMakeNetworkRequestForURL(url)) { 4916 ShouldMakeNetworkRequestForURL(url)) {
4913 BeginNavigation(&info.urlRequest, info.replacesCurrentHistoryItem, 4917 BeginNavigation(&info.urlRequest, info.replacesCurrentHistoryItem,
4914 info.isClientRedirect); 4918 info.isClientRedirect);
4915 return blink::WebNavigationPolicyIgnore; 4919 return blink::WebNavigationPolicyHandledByClient;
4916 } 4920 }
4917 4921
4918 return info.defaultPolicy; 4922 return info.defaultPolicy;
4919 } 4923 }
4920 4924
4921 void RenderFrameImpl::OnGetSavableResourceLinks() { 4925 void RenderFrameImpl::OnGetSavableResourceLinks() {
4922 std::vector<GURL> resources_list; 4926 std::vector<GURL> resources_list;
4923 std::vector<SavableSubframe> subframes; 4927 std::vector<SavableSubframe> subframes;
4924 SavableResourcesResult result(&resources_list, &subframes); 4928 SavableResourcesResult result(&resources_list, &subframes);
4925 4929
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
6086 int match_count, 6090 int match_count,
6087 int ordinal, 6091 int ordinal,
6088 const WebRect& selection_rect, 6092 const WebRect& selection_rect,
6089 bool final_status_update) { 6093 bool final_status_update) {
6090 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6094 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6091 selection_rect, ordinal, 6095 selection_rect, ordinal,
6092 final_status_update)); 6096 final_status_update));
6093 } 6097 }
6094 6098
6095 } // namespace content 6099 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698