Chromium Code Reviews| 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: send the request to the browser if needed. |
|
clamy
2015/07/03 11:41:44
Could you rephrase the comment to something like "
Fabrice (no longer in Chrome)
2015/07/03 14:55:36
Done.
| |
| 4333 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 4333 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 4334 switches::kEnableBrowserSideNavigation) && | 4334 switches::kEnableBrowserSideNavigation) && |
| 4335 info.urlRequest.checkForBrowserSideNavigation()) { | 4335 info.urlRequest.checkForBrowserSideNavigation() && |
| 4336 CommonNavigationParams::ShouldMakeNetworkRequest(url)) { | |
| 4336 BeginNavigation(&info.urlRequest); | 4337 BeginNavigation(&info.urlRequest); |
| 4337 return blink::WebNavigationPolicyIgnore; | 4338 return blink::WebNavigationPolicyIgnore; |
| 4338 } | 4339 } |
| 4339 | 4340 |
| 4340 return info.defaultPolicy; | 4341 return info.defaultPolicy; |
| 4341 } | 4342 } |
| 4342 | 4343 |
| 4343 void RenderFrameImpl::OpenURL(WebFrame* frame, | 4344 void RenderFrameImpl::OpenURL(WebFrame* frame, |
| 4344 const GURL& url, | 4345 const GURL& url, |
| 4345 const Referrer& referrer, | 4346 const Referrer& referrer, |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5002 cdm_manager_ | 5003 cdm_manager_ |
| 5003 #endif | 5004 #endif |
| 5004 )); | 5005 )); |
| 5005 #endif // defined(ENABLE_MOJO_MEDIA) | 5006 #endif // defined(ENABLE_MOJO_MEDIA) |
| 5006 } | 5007 } |
| 5007 | 5008 |
| 5008 return cdm_factory_.get(); | 5009 return cdm_factory_.get(); |
| 5009 } | 5010 } |
| 5010 | 5011 |
| 5011 } // namespace content | 5012 } // namespace content |
| OLD | NEW |