| 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 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 5457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5468 base::TimeTicks::Now(); | 5468 base::TimeTicks::Now(); |
| 5469 } | 5469 } |
| 5470 } | 5470 } |
| 5471 | 5471 |
| 5472 // PlzNavigate: if the navigation is not synchronous, send it to the browser. | 5472 // PlzNavigate: if the navigation is not synchronous, send it to the browser. |
| 5473 // This includes navigations with no request being sent to the network stack. | 5473 // This includes navigations with no request being sent to the network stack. |
| 5474 if (IsBrowserSideNavigationEnabled() && | 5474 if (IsBrowserSideNavigationEnabled() && |
| 5475 info.urlRequest.checkForBrowserSideNavigation() && | 5475 info.urlRequest.checkForBrowserSideNavigation() && |
| 5476 ShouldMakeNetworkRequestForURL(url)) { | 5476 ShouldMakeNetworkRequestForURL(url)) { |
| 5477 if (info.defaultPolicy == blink::WebNavigationPolicyCurrentTab) { | 5477 if (info.defaultPolicy == blink::WebNavigationPolicyCurrentTab) { |
| 5478 if (RenderThreadImpl::current() && | |
| 5479 RenderThreadImpl::current()->layout_test_mode()) { | |
| 5480 // Layout tests sometimes attempt to load urls of the form | |
| 5481 // about:blank?foo which the browser doesn't expect and will convert to | |
| 5482 // about:blank. Don't send these to the browser. | |
| 5483 if (url.SchemeIs(url::kAboutScheme) && url.path() == "blank") | |
| 5484 return info.defaultPolicy; | |
| 5485 } | |
| 5486 | |
| 5487 BeginNavigation(info); | 5478 BeginNavigation(info); |
| 5488 return blink::WebNavigationPolicyHandledByClient; | 5479 return blink::WebNavigationPolicyHandledByClient; |
| 5489 } else { | 5480 } else { |
| 5490 LoadURLExternally(info.urlRequest, info.defaultPolicy); | 5481 LoadURLExternally(info.urlRequest, info.defaultPolicy); |
| 5491 return blink::WebNavigationPolicyIgnore; | 5482 return blink::WebNavigationPolicyIgnore; |
| 5492 } | 5483 } |
| 5493 } | 5484 } |
| 5494 | 5485 |
| 5495 return info.defaultPolicy; | 5486 return info.defaultPolicy; |
| 5496 } | 5487 } |
| (...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6879 // event target. Potentially a Pepper plugin will receive the event. | 6870 // event target. Potentially a Pepper plugin will receive the event. |
| 6880 // In order to tell whether a plugin gets the last mouse event and which it | 6871 // In order to tell whether a plugin gets the last mouse event and which it |
| 6881 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6872 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6882 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6873 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6883 // |pepper_last_mouse_event_target_|. | 6874 // |pepper_last_mouse_event_target_|. |
| 6884 pepper_last_mouse_event_target_ = nullptr; | 6875 pepper_last_mouse_event_target_ = nullptr; |
| 6885 #endif | 6876 #endif |
| 6886 } | 6877 } |
| 6887 | 6878 |
| 6888 } // namespace content | 6879 } // namespace content |
| OLD | NEW |