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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2323153003: PlzNavigate: make ctrl+click works. (Closed)
Patch Set: Addressed comments + rebase. Created 4 years, 3 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
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f580526323d13b673d5d1ee4a7133846afc88609..328b4f31ac0a737028e6132804339283abf8f224 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5133,8 +5133,13 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
if (IsBrowserSideNavigationEnabled() &&
info.urlRequest.checkForBrowserSideNavigation() &&
ShouldMakeNetworkRequestForURL(url)) {
- BeginNavigation(info);
- return blink::WebNavigationPolicyHandledByClient;
+ if (info.defaultPolicy == blink::WebNavigationPolicyCurrentTab) {
+ BeginNavigation(info);
+ return blink::WebNavigationPolicyHandledByClient;
+ } else {
+ LoadURLExternally(info.urlRequest, info.defaultPolicy);
+ return blink::WebNavigationPolicyIgnore;
+ }
}
return info.defaultPolicy;
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.browser_tests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698