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 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3142 const ResourceResponseHead head = response ? | 3142 const ResourceResponseHead head = response ? |
3143 response->head : ResourceResponseHead(); | 3143 response->head : ResourceResponseHead(); |
3144 FrameMsg_CommitDataNetworkService_Params commit_data; | 3144 FrameMsg_CommitDataNetworkService_Params commit_data; |
3145 commit_data.handle = handle.release(); | 3145 commit_data.handle = handle.release(); |
3146 // TODO(scottmg): Pass a factory for SW, etc. once we have one. | 3146 // TODO(scottmg): Pass a factory for SW, etc. once we have one. |
3147 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 3147 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
3148 switches::kEnableNetworkService)) { | 3148 switches::kEnableNetworkService)) { |
3149 const auto& schemes = URLDataManagerBackend::GetWebUISchemes(); | 3149 const auto& schemes = URLDataManagerBackend::GetWebUISchemes(); |
3150 if (std::find(schemes.begin(), schemes.end(), common_params.url.scheme()) != | 3150 if (std::find(schemes.begin(), schemes.end(), common_params.url.scheme()) != |
3151 schemes.end()) { | 3151 schemes.end()) { |
3152 commit_data.url_loader_factory = GetWebUIURLLoader(frame_tree_node_) | 3152 commit_data.url_loader_factory = CreateWebUIURLLoader(frame_tree_node_) |
3153 .PassInterface() | 3153 .PassInterface() |
3154 .PassHandle() | 3154 .PassHandle() |
3155 .release(); | 3155 .release(); |
3156 } | 3156 } |
3157 } | 3157 } |
3158 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data, | 3158 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data, |
3159 common_params, request_params)); | 3159 common_params, request_params)); |
3160 | 3160 |
3161 // If a network request was made, update the Previews state. | 3161 // If a network request was made, update the Previews state. |
3162 if (ShouldMakeNetworkRequestForURL(common_params.url) && | 3162 if (ShouldMakeNetworkRequestForURL(common_params.url) && |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4094 } | 4094 } |
4095 | 4095 |
4096 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 4096 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
4097 const std::string& interface_name, | 4097 const std::string& interface_name, |
4098 mojo::ScopedMessagePipeHandle pipe) { | 4098 mojo::ScopedMessagePipeHandle pipe) { |
4099 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 4099 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
4100 } | 4100 } |
4101 #endif | 4101 #endif |
4102 | 4102 |
4103 } // namespace content | 4103 } // namespace content |
OLD | NEW |