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 5115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5126 pending_navigation_params_->common_params.navigation_start = | 5126 pending_navigation_params_->common_params.navigation_start = |
5127 base::TimeTicks::Now(); | 5127 base::TimeTicks::Now(); |
5128 } | 5128 } |
5129 } | 5129 } |
5130 | 5130 |
5131 // PlzNavigate: if the navigation is not synchronous, send it to the browser. | 5131 // PlzNavigate: if the navigation is not synchronous, send it to the browser. |
5132 // This includes navigations with no request being sent to the network stack. | 5132 // This includes navigations with no request being sent to the network stack. |
5133 if (IsBrowserSideNavigationEnabled() && | 5133 if (IsBrowserSideNavigationEnabled() && |
5134 info.urlRequest.checkForBrowserSideNavigation() && | 5134 info.urlRequest.checkForBrowserSideNavigation() && |
5135 ShouldMakeNetworkRequestForURL(url)) { | 5135 ShouldMakeNetworkRequestForURL(url)) { |
5136 BeginNavigation(info); | 5136 if (info.defaultPolicy == blink::WebNavigationPolicyCurrentTab) { |
5137 return blink::WebNavigationPolicyHandledByClient; | 5137 BeginNavigation(info); |
| 5138 return blink::WebNavigationPolicyHandledByClient; |
| 5139 } else { |
| 5140 LoadURLExternally(info.urlRequest, info.defaultPolicy); |
| 5141 return blink::WebNavigationPolicyIgnore; |
| 5142 } |
5138 } | 5143 } |
5139 | 5144 |
5140 return info.defaultPolicy; | 5145 return info.defaultPolicy; |
5141 } | 5146 } |
5142 | 5147 |
5143 void RenderFrameImpl::OnGetSavableResourceLinks() { | 5148 void RenderFrameImpl::OnGetSavableResourceLinks() { |
5144 std::vector<GURL> resources_list; | 5149 std::vector<GURL> resources_list; |
5145 std::vector<SavableSubframe> subframes; | 5150 std::vector<SavableSubframe> subframes; |
5146 SavableResourcesResult result(&resources_list, &subframes); | 5151 SavableResourcesResult result(&resources_list, &subframes); |
5147 | 5152 |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6395 // event target. Potentially a Pepper plugin will receive the event. | 6400 // event target. Potentially a Pepper plugin will receive the event. |
6396 // In order to tell whether a plugin gets the last mouse event and which it | 6401 // In order to tell whether a plugin gets the last mouse event and which it |
6397 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6402 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6398 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6403 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6399 // |pepper_last_mouse_event_target_|. | 6404 // |pepper_last_mouse_event_target_|. |
6400 pepper_last_mouse_event_target_ = nullptr; | 6405 pepper_last_mouse_event_target_ = nullptr; |
6401 #endif | 6406 #endif |
6402 } | 6407 } |
6403 | 6408 |
6404 } // namespace content | 6409 } // namespace content |
OLD | NEW |