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