OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 base::Unretained(widget_helper_.get()))); | 1149 base::Unretained(widget_helper_.get()))); |
1150 AddFilter(message_port_message_filter_.get()); | 1150 AddFilter(message_port_message_filter_.get()); |
1151 | 1151 |
1152 scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter = | 1152 scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter = |
1153 new CacheStorageDispatcherHost(); | 1153 new CacheStorageDispatcherHost(); |
1154 cache_storage_filter->Init(storage_partition_impl_->GetCacheStorageContext()); | 1154 cache_storage_filter->Init(storage_partition_impl_->GetCacheStorageContext()); |
1155 AddFilter(cache_storage_filter.get()); | 1155 AddFilter(cache_storage_filter.get()); |
1156 | 1156 |
1157 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = | 1157 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = |
1158 new ServiceWorkerDispatcherHost( | 1158 new ServiceWorkerDispatcherHost( |
1159 GetID(), message_port_message_filter_.get(), resource_context); | 1159 GetID(), message_port_message_filter_.get(), resource_context, |
| 1160 base::Bind(&RenderProcessHostImpl::CreateURLLoaderFactory, |
| 1161 weak_factory_.GetWeakPtr())); |
1160 service_worker_filter->Init( | 1162 service_worker_filter->Init( |
1161 storage_partition_impl_->GetServiceWorkerContext()); | 1163 storage_partition_impl_->GetServiceWorkerContext()); |
1162 AddFilter(service_worker_filter.get()); | 1164 AddFilter(service_worker_filter.get()); |
1163 | 1165 |
1164 AddFilter(new SharedWorkerMessageFilter( | 1166 AddFilter(new SharedWorkerMessageFilter( |
1165 GetID(), resource_context, | 1167 GetID(), resource_context, |
1166 WorkerStoragePartition( | 1168 WorkerStoragePartition( |
1167 storage_partition_impl_->GetURLRequestContext(), | 1169 storage_partition_impl_->GetURLRequestContext(), |
1168 storage_partition_impl_->GetMediaURLRequestContext(), | 1170 storage_partition_impl_->GetMediaURLRequestContext(), |
1169 storage_partition_impl_->GetAppCacheService(), | 1171 storage_partition_impl_->GetAppCacheService(), |
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 const std::string& error) { | 2995 const std::string& error) { |
2994 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2996 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2995 | 2997 |
2996 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2998 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2997 // enough information here so that we can determine what the bad message was. | 2999 // enough information here so that we can determine what the bad message was. |
2998 base::debug::Alias(&error); | 3000 base::debug::Alias(&error); |
2999 bad_message::ReceivedBadMessage(render_process_id, | 3001 bad_message::ReceivedBadMessage(render_process_id, |
3000 bad_message::RPH_MOJO_PROCESS_ERROR); | 3002 bad_message::RPH_MOJO_PROCESS_ERROR); |
3001 } | 3003 } |
3002 | 3004 |
| 3005 void RenderProcessHostImpl::CreateURLLoaderFactory( |
| 3006 mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { |
| 3007 URLLoaderFactoryImpl::Create(resource_message_filter_, std::move(request)); |
| 3008 } |
| 3009 |
3003 } // namespace content | 3010 } // namespace content |
OLD | NEW |