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 3214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3225 DCHECK(!GetParent()); | 3225 DCHECK(!GetParent()); |
3226 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_)); | 3226 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_)); |
3227 } | 3227 } |
3228 | 3228 |
3229 const GURL body_url = body.get() ? body->GetURL() : GURL(); | 3229 const GURL body_url = body.get() ? body->GetURL() : GURL(); |
3230 const ResourceResponseHead head = response ? | 3230 const ResourceResponseHead head = response ? |
3231 response->head : ResourceResponseHead(); | 3231 response->head : ResourceResponseHead(); |
3232 FrameMsg_CommitDataNetworkService_Params commit_data; | 3232 FrameMsg_CommitDataNetworkService_Params commit_data; |
3233 commit_data.handle = handle.release(); | 3233 commit_data.handle = handle.release(); |
3234 // TODO(scottmg): Pass a factory for SW, etc. once we have one. | 3234 // TODO(scottmg): Pass a factory for SW, etc. once we have one. |
3235 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 3235 if (base::FeatureList::IsEnabled(features::kNetworkService)) { |
3236 switches::kEnableNetworkService)) { | |
3237 if (!subresource_url_loader_factory_info.is_valid()) { | 3236 if (!subresource_url_loader_factory_info.is_valid()) { |
3238 const auto& schemes = URLDataManagerBackend::GetWebUISchemes(); | 3237 const auto& schemes = URLDataManagerBackend::GetWebUISchemes(); |
3239 if (std::find(schemes.begin(), schemes.end(), | 3238 if (std::find(schemes.begin(), schemes.end(), |
3240 common_params.url.scheme()) != schemes.end()) { | 3239 common_params.url.scheme()) != schemes.end()) { |
3241 commit_data.url_loader_factory = CreateWebUIURLLoader(frame_tree_node_) | 3240 commit_data.url_loader_factory = CreateWebUIURLLoader(frame_tree_node_) |
3242 .PassInterface() | 3241 .PassInterface() |
3243 .PassHandle() | 3242 .PassHandle() |
3244 .release(); | 3243 .release(); |
3245 } | 3244 } |
3246 } else { | 3245 } else { |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4180 } | 4179 } |
4181 | 4180 |
4182 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 4181 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
4183 const std::string& interface_name, | 4182 const std::string& interface_name, |
4184 mojo::ScopedMessagePipeHandle pipe) { | 4183 mojo::ScopedMessagePipeHandle pipe) { |
4185 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 4184 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
4186 } | 4185 } |
4187 #endif | 4186 #endif |
4188 | 4187 |
4189 } // namespace content | 4188 } // namespace content |
OLD | NEW |