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 | 5468 |
5469 #if defined(OS_ANDROID) | 5469 #if defined(OS_ANDROID) |
5470 request.setHasUserGesture(start_params.has_user_gesture); | 5470 request.setHasUserGesture(start_params.has_user_gesture); |
5471 #endif | 5471 #endif |
5472 | 5472 |
5473 // PlzNavigate: Make sure that Blink's loader will not try to use browser side | 5473 // PlzNavigate: Make sure that Blink's loader will not try to use browser side |
5474 // navigation for this request (since it already went to the browser). | 5474 // navigation for this request (since it already went to the browser). |
5475 if (browser_side_navigation) | 5475 if (browser_side_navigation) |
5476 request.setCheckForBrowserSideNavigation(false); | 5476 request.setCheckForBrowserSideNavigation(false); |
5477 | 5477 |
| 5478 // PlzNavigate: Store the previous ResourceResponses in the request. |
| 5479 DCHECK(request_params.redirects.size() == |
| 5480 request_params.resource_response_infos.size()); |
| 5481 for (size_t i = 0; i < request_params.redirects.size(); ++i) { |
| 5482 const GURL& url = request_params.redirects[i]; |
| 5483 const ResourceResponseInfo& info = |
| 5484 request_params.resource_response_infos[i]; |
| 5485 WebURLResponse response; |
| 5486 WebURLLoaderImpl::PopulateURLResponse(url, info, &response, false); |
| 5487 request.appendPreviousResponse(response); |
| 5488 } |
| 5489 request.setPreviousNavigationStart( |
| 5490 (common_params.navigation_start - base::TimeTicks()).InSecondsF()); |
| 5491 |
5478 // If we are reloading, then use the history state of the current frame. | 5492 // If we are reloading, then use the history state of the current frame. |
5479 // Otherwise, if we have history state, then we need to navigate to it, which | 5493 // Otherwise, if we have history state, then we need to navigate to it, which |
5480 // corresponds to a back/forward navigation event. Update the parameters | 5494 // corresponds to a back/forward navigation event. Update the parameters |
5481 // depending on the navigation type. | 5495 // depending on the navigation type. |
5482 if (is_reload) { | 5496 if (is_reload) { |
5483 load_type = ReloadFrameLoadTypeFor(common_params.navigation_type); | 5497 load_type = ReloadFrameLoadTypeFor(common_params.navigation_type); |
5484 | 5498 |
5485 if (!browser_side_navigation) { | 5499 if (!browser_side_navigation) { |
5486 const GURL override_url = | 5500 const GURL override_url = |
5487 (common_params.navigation_type == | 5501 (common_params.navigation_type == |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6333 // event target. Potentially a Pepper plugin will receive the event. | 6347 // event target. Potentially a Pepper plugin will receive the event. |
6334 // In order to tell whether a plugin gets the last mouse event and which it | 6348 // In order to tell whether a plugin gets the last mouse event and which it |
6335 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6349 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6336 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6350 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6337 // |pepper_last_mouse_event_target_|. | 6351 // |pepper_last_mouse_event_target_|. |
6338 pepper_last_mouse_event_target_ = nullptr; | 6352 pepper_last_mouse_event_target_ = nullptr; |
6339 #endif | 6353 #endif |
6340 } | 6354 } |
6341 | 6355 |
6342 } // namespace content | 6356 } // namespace content |
OLD | NEW |