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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2855763002: network service: Plumbing to get URLLoaderFactory to renderer on nav commit (Closed)
Patch Set: fixes Created 3 years, 7 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
« no previous file with comments | « no previous file | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 // happen. When reusing the same renderer, overwrite to recover the mode. 3012 // happen. When reusing the same renderer, overwrite to recover the mode.
3013 if (is_view_source && 3013 if (is_view_source &&
3014 this == frame_tree_node_->render_manager()->current_frame_host()) { 3014 this == frame_tree_node_->render_manager()->current_frame_host()) {
3015 DCHECK(!GetParent()); 3015 DCHECK(!GetParent());
3016 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_)); 3016 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_));
3017 } 3017 }
3018 3018
3019 const GURL body_url = body.get() ? body->GetURL() : GURL(); 3019 const GURL body_url = body.get() ? body->GetURL() : GURL();
3020 const ResourceResponseHead head = response ? 3020 const ResourceResponseHead head = response ?
3021 response->head : ResourceResponseHead(); 3021 response->head : ResourceResponseHead();
3022 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, 3022 FrameMsg_CommitDataNetworkService_Params commit_data;
3023 handle.release(), common_params, 3023 commit_data.handle = handle.release();
3024 request_params)); 3024 // TODO(scottmg): Pass a factory for SW, etc. once we have one.
3025 commit_data.url_loader_factory = mojo::MessagePipeHandle();
3026 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data,
3027 common_params, request_params));
3025 3028
3026 // If a network request was made, update the Previews state. 3029 // If a network request was made, update the Previews state.
3027 if (ShouldMakeNetworkRequestForURL(common_params.url) && 3030 if (ShouldMakeNetworkRequestForURL(common_params.url) &&
3028 !FrameMsg_Navigate_Type::IsSameDocument(common_params.navigation_type)) { 3031 !FrameMsg_Navigate_Type::IsSameDocument(common_params.navigation_type)) {
3029 last_navigation_previews_state_ = common_params.previews_state; 3032 last_navigation_previews_state_ = common_params.previews_state;
3030 } 3033 }
3031 3034
3032 // TODO(clamy): Release the stream handle once the renderer has finished 3035 // TODO(clamy): Release the stream handle once the renderer has finished
3033 // reading it. 3036 // reading it.
3034 stream_handle_ = std::move(body); 3037 stream_handle_ = std::move(body);
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
3863 } 3866 }
3864 3867
3865 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 3868 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
3866 const std::string& interface_name, 3869 const std::string& interface_name,
3867 mojo::ScopedMessagePipeHandle pipe) { 3870 mojo::ScopedMessagePipeHandle pipe) {
3868 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 3871 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
3869 } 3872 }
3870 #endif 3873 #endif
3871 3874
3872 } // namespace content 3875 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698