OLD | NEW |
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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 4311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4322 info.defaultPolicy == blink::WebNavigationPolicyCurrentTab && | 4322 info.defaultPolicy == blink::WebNavigationPolicyCurrentTab && |
4323 // Must be a JavaScript navigation, which appears as "other". | 4323 // Must be a JavaScript navigation, which appears as "other". |
4324 info.navigationType == blink::WebNavigationTypeOther; | 4324 info.navigationType == blink::WebNavigationTypeOther; |
4325 | 4325 |
4326 if (is_fork) { | 4326 if (is_fork) { |
4327 // Open the URL via the browser, not via WebKit. | 4327 // Open the URL via the browser, not via WebKit. |
4328 OpenURL(info.frame, url, Referrer(), info.defaultPolicy); | 4328 OpenURL(info.frame, url, Referrer(), info.defaultPolicy); |
4329 return blink::WebNavigationPolicyIgnore; | 4329 return blink::WebNavigationPolicyIgnore; |
4330 } | 4330 } |
4331 | 4331 |
4332 // PlzNavigate: send the request to the browser if needed. | 4332 // PlzNavigate: if the navigation is not synchronous, send it to the browser. |
| 4333 // This includes navigations with no request being sent to the network stack. |
4333 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 4334 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
4334 switches::kEnableBrowserSideNavigation) && | 4335 switches::kEnableBrowserSideNavigation) && |
4335 info.urlRequest.checkForBrowserSideNavigation()) { | 4336 info.urlRequest.checkForBrowserSideNavigation() && |
| 4337 ShouldMakeNetworkRequestForURL(url)) { |
4336 BeginNavigation(&info.urlRequest); | 4338 BeginNavigation(&info.urlRequest); |
4337 return blink::WebNavigationPolicyIgnore; | 4339 return blink::WebNavigationPolicyIgnore; |
4338 } | 4340 } |
4339 | 4341 |
4340 return info.defaultPolicy; | 4342 return info.defaultPolicy; |
4341 } | 4343 } |
4342 | 4344 |
4343 void RenderFrameImpl::OpenURL(WebFrame* frame, | 4345 void RenderFrameImpl::OpenURL(WebFrame* frame, |
4344 const GURL& url, | 4346 const GURL& url, |
4345 const Referrer& referrer, | 4347 const Referrer& referrer, |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5002 cdm_manager_ | 5004 cdm_manager_ |
5003 #endif | 5005 #endif |
5004 )); | 5006 )); |
5005 #endif // defined(ENABLE_MOJO_MEDIA) | 5007 #endif // defined(ENABLE_MOJO_MEDIA) |
5006 } | 5008 } |
5007 | 5009 |
5008 return cdm_factory_.get(); | 5010 return cdm_factory_.get(); |
5009 } | 5011 } |
5010 | 5012 |
5011 } // namespace content | 5013 } // namespace content |
OLD | NEW |