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 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 5380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5391 base::TimeTicks::Now(); | 5391 base::TimeTicks::Now(); |
| 5392 } | 5392 } |
| 5393 } | 5393 } |
| 5394 | 5394 |
| 5395 // PlzNavigate: if the navigation is not synchronous, send it to the browser. | 5395 // PlzNavigate: if the navigation is not synchronous, send it to the browser. |
| 5396 // This includes navigations with no request being sent to the network stack. | 5396 // This includes navigations with no request being sent to the network stack. |
| 5397 if (IsBrowserSideNavigationEnabled() && | 5397 if (IsBrowserSideNavigationEnabled() && |
| 5398 info.urlRequest.checkForBrowserSideNavigation() && | 5398 info.urlRequest.checkForBrowserSideNavigation() && |
| 5399 ShouldMakeNetworkRequestForURL(url)) { | 5399 ShouldMakeNetworkRequestForURL(url)) { |
| 5400 if (info.defaultPolicy == blink::WebNavigationPolicyCurrentTab) { | 5400 if (info.defaultPolicy == blink::WebNavigationPolicyCurrentTab) { |
| 5401 if (RenderThreadImpl::current() && | |
| 5402 RenderThreadImpl::current()->layout_test_mode()) { | |
| 5403 // Layout tests sometimes attempt to load urls of the form | |
| 5404 // about:blank?foo which the browser doesn't expect and will convert to | |
| 5405 // about:blank. Don't send these to the browser. | |
| 5406 if (url.SchemeIs(url::kAboutScheme) && url.path() == "blank") | |
|
nasko
2017/01/09 23:57:51
Ugh, is "blank: really parsed as the "path" part o
clamy
2017/01/10 12:13:52
Yeah I know. I had to print all parts of the url t
| |
| 5407 return info.defaultPolicy; | |
| 5408 } | |
| 5409 | |
| 5401 BeginNavigation(info); | 5410 BeginNavigation(info); |
| 5402 return blink::WebNavigationPolicyHandledByClient; | 5411 return blink::WebNavigationPolicyHandledByClient; |
| 5403 } else { | 5412 } else { |
| 5404 LoadURLExternally(info.urlRequest, info.defaultPolicy); | 5413 LoadURLExternally(info.urlRequest, info.defaultPolicy); |
| 5405 return blink::WebNavigationPolicyIgnore; | 5414 return blink::WebNavigationPolicyIgnore; |
| 5406 } | 5415 } |
| 5407 } | 5416 } |
| 5408 | 5417 |
| 5409 return info.defaultPolicy; | 5418 return info.defaultPolicy; |
| 5410 } | 5419 } |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6776 // event target. Potentially a Pepper plugin will receive the event. | 6785 // event target. Potentially a Pepper plugin will receive the event. |
| 6777 // In order to tell whether a plugin gets the last mouse event and which it | 6786 // In order to tell whether a plugin gets the last mouse event and which it |
| 6778 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6787 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6779 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6788 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6780 // |pepper_last_mouse_event_target_|. | 6789 // |pepper_last_mouse_event_target_|. |
| 6781 pepper_last_mouse_event_target_ = nullptr; | 6790 pepper_last_mouse_event_target_ = nullptr; |
| 6782 #endif | 6791 #endif |
| 6783 } | 6792 } |
| 6784 | 6793 |
| 6785 } // namespace content | 6794 } // namespace content |
| OLD | NEW |