Chromium Code Reviews| 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/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 Loading... | |
| 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(); | |
|
kinuko
2017/05/02 03:37:50
When network service is enabled we already have on
scottmg
2017/05/02 15:19:22
Right, when --enable-network-service is on, the re
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |