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 5220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5231 | 5231 |
5232 void RenderFrameImpl::FocusedNodeChangedForAccessibility(const WebNode& node) { | 5232 void RenderFrameImpl::FocusedNodeChangedForAccessibility(const WebNode& node) { |
5233 if (render_accessibility()) | 5233 if (render_accessibility()) |
5234 render_accessibility()->AccessibilityFocusedNodeChanged(node); | 5234 render_accessibility()->AccessibilityFocusedNodeChanged(node); |
5235 } | 5235 } |
5236 | 5236 |
5237 // PlzNavigate | 5237 // PlzNavigate |
5238 void RenderFrameImpl::OnCommitNavigation( | 5238 void RenderFrameImpl::OnCommitNavigation( |
5239 const ResourceResponseHead& response, | 5239 const ResourceResponseHead& response, |
5240 const GURL& stream_url, | 5240 const GURL& stream_url, |
5241 mojo::DataPipeConsumerHandle handle, | 5241 const FrameMsg_CommitDataNetworkService_Params& commit_data, |
5242 const CommonNavigationParams& common_params, | 5242 const CommonNavigationParams& common_params, |
5243 const RequestNavigationParams& request_params) { | 5243 const RequestNavigationParams& request_params) { |
5244 CHECK(IsBrowserSideNavigationEnabled()); | 5244 CHECK(IsBrowserSideNavigationEnabled()); |
5245 // This will override the url requested by the WebURLLoader, as well as | 5245 // This will override the url requested by the WebURLLoader, as well as |
5246 // provide it with the response to the request. | 5246 // provide it with the response to the request. |
5247 std::unique_ptr<StreamOverrideParameters> stream_override( | 5247 std::unique_ptr<StreamOverrideParameters> stream_override( |
5248 new StreamOverrideParameters()); | 5248 new StreamOverrideParameters()); |
5249 stream_override->stream_url = stream_url; | 5249 stream_override->stream_url = stream_url; |
5250 stream_override->consumer_handle = mojo::ScopedDataPipeConsumerHandle(handle); | 5250 stream_override->consumer_handle = |
| 5251 mojo::ScopedDataPipeConsumerHandle(commit_data.handle); |
5251 stream_override->response = response; | 5252 stream_override->response = response; |
5252 stream_override->redirects = request_params.redirects; | 5253 stream_override->redirects = request_params.redirects; |
5253 stream_override->redirect_responses = request_params.redirect_response; | 5254 stream_override->redirect_responses = request_params.redirect_response; |
5254 stream_override->redirect_infos = request_params.redirect_infos; | 5255 stream_override->redirect_infos = request_params.redirect_infos; |
5255 | 5256 |
| 5257 if (commit_data.url_loader_factory.is_valid()) { |
| 5258 // Chrome doesn't use interface versioning. |
| 5259 url_loader_factory_.Bind(mojom::URLLoaderFactoryPtrInfo( |
| 5260 mojo::ScopedMessagePipeHandle(commit_data.url_loader_factory), 0u)); |
| 5261 } |
| 5262 |
5256 // If the request was initiated in the context of a user gesture then make | 5263 // If the request was initiated in the context of a user gesture then make |
5257 // sure that the navigation also executes in the context of a user gesture. | 5264 // sure that the navigation also executes in the context of a user gesture. |
5258 std::unique_ptr<blink::WebScopedUserGesture> gesture( | 5265 std::unique_ptr<blink::WebScopedUserGesture> gesture( |
5259 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) | 5266 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) |
5260 : nullptr); | 5267 : nullptr); |
5261 | 5268 |
5262 browser_side_navigation_pending_ = false; | 5269 browser_side_navigation_pending_ = false; |
5263 | 5270 |
5264 NavigateInternal(common_params, StartNavigationParams(), request_params, | 5271 NavigateInternal(common_params, StartNavigationParams(), request_params, |
5265 std::move(stream_override)); | 5272 std::move(stream_override)); |
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7040 policy(info.default_policy), | 7047 policy(info.default_policy), |
7041 replaces_current_history_item(info.replaces_current_history_item), | 7048 replaces_current_history_item(info.replaces_current_history_item), |
7042 history_navigation_in_new_child_frame( | 7049 history_navigation_in_new_child_frame( |
7043 info.is_history_navigation_in_new_child_frame), | 7050 info.is_history_navigation_in_new_child_frame), |
7044 client_redirect(info.is_client_redirect), | 7051 client_redirect(info.is_client_redirect), |
7045 cache_disabled(info.is_cache_disabled), | 7052 cache_disabled(info.is_cache_disabled), |
7046 form(info.form), | 7053 form(info.form), |
7047 source_location(info.source_location) {} | 7054 source_location(info.source_location) {} |
7048 | 7055 |
7049 } // namespace content | 7056 } // namespace content |
OLD | NEW |