Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2813243002: network service: pass PlzNavigate resulting data via mojo data pipe (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 5179 matching lines...) Expand 10 before | Expand all | Expand 10 after
5190 5190
5191 void RenderFrameImpl::FocusedNodeChangedForAccessibility(const WebNode& node) { 5191 void RenderFrameImpl::FocusedNodeChangedForAccessibility(const WebNode& node) {
5192 if (render_accessibility()) 5192 if (render_accessibility())
5193 render_accessibility()->AccessibilityFocusedNodeChanged(node); 5193 render_accessibility()->AccessibilityFocusedNodeChanged(node);
5194 } 5194 }
5195 5195
5196 // PlzNavigate 5196 // PlzNavigate
5197 void RenderFrameImpl::OnCommitNavigation( 5197 void RenderFrameImpl::OnCommitNavigation(
5198 const ResourceResponseHead& response, 5198 const ResourceResponseHead& response,
5199 const GURL& stream_url, 5199 const GURL& stream_url,
5200 mojo::DataPipeConsumerHandle handle,
5200 const CommonNavigationParams& common_params, 5201 const CommonNavigationParams& common_params,
5201 const RequestNavigationParams& request_params) { 5202 const RequestNavigationParams& request_params) {
5202 CHECK(IsBrowserSideNavigationEnabled()); 5203 CHECK(IsBrowserSideNavigationEnabled());
5203 // This will override the url requested by the WebURLLoader, as well as 5204 // This will override the url requested by the WebURLLoader, as well as
5204 // provide it with the response to the request. 5205 // provide it with the response to the request.
5205 std::unique_ptr<StreamOverrideParameters> stream_override( 5206 std::unique_ptr<StreamOverrideParameters> stream_override(
5206 new StreamOverrideParameters()); 5207 new StreamOverrideParameters());
5207 stream_override->stream_url = stream_url; 5208 stream_override->stream_url = stream_url;
5209 stream_override->consumer_handle = mojo::ScopedDataPipeConsumerHandle(handle);
5208 stream_override->response = response; 5210 stream_override->response = response;
5209 stream_override->redirects = request_params.redirects; 5211 stream_override->redirects = request_params.redirects;
5210 stream_override->redirect_responses = request_params.redirect_response; 5212 stream_override->redirect_responses = request_params.redirect_response;
5211 stream_override->redirect_infos = request_params.redirect_infos; 5213 stream_override->redirect_infos = request_params.redirect_infos;
5212 5214
5213 // If the request was initiated in the context of a user gesture then make 5215 // If the request was initiated in the context of a user gesture then make
5214 // sure that the navigation also executes in the context of a user gesture. 5216 // sure that the navigation also executes in the context of a user gesture.
5215 std::unique_ptr<blink::WebScopedUserGesture> gesture( 5217 std::unique_ptr<blink::WebScopedUserGesture> gesture(
5216 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) 5218 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_)
5217 : nullptr); 5219 : nullptr);
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
6971 policy(info.default_policy), 6973 policy(info.default_policy),
6972 replaces_current_history_item(info.replaces_current_history_item), 6974 replaces_current_history_item(info.replaces_current_history_item),
6973 history_navigation_in_new_child_frame( 6975 history_navigation_in_new_child_frame(
6974 info.is_history_navigation_in_new_child_frame), 6976 info.is_history_navigation_in_new_child_frame),
6975 client_redirect(info.is_client_redirect), 6977 client_redirect(info.is_client_redirect),
6976 cache_disabled(info.is_cache_disabled), 6978 cache_disabled(info.is_cache_disabled),
6977 form(info.form), 6979 form(info.form),
6978 source_location(info.source_location) {} 6980 source_location(info.source_location) {}
6979 6981
6980 } // namespace content 6982 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698