| 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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 base::Unretained(widget_helper_.get()))); | 1129 base::Unretained(widget_helper_.get()))); |
| 1130 AddFilter(message_port_message_filter_.get()); | 1130 AddFilter(message_port_message_filter_.get()); |
| 1131 | 1131 |
| 1132 scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter = | 1132 scoped_refptr<CacheStorageDispatcherHost> cache_storage_filter = |
| 1133 new CacheStorageDispatcherHost(); | 1133 new CacheStorageDispatcherHost(); |
| 1134 cache_storage_filter->Init(storage_partition_impl_->GetCacheStorageContext()); | 1134 cache_storage_filter->Init(storage_partition_impl_->GetCacheStorageContext()); |
| 1135 AddFilter(cache_storage_filter.get()); | 1135 AddFilter(cache_storage_filter.get()); |
| 1136 | 1136 |
| 1137 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = | 1137 scoped_refptr<ServiceWorkerDispatcherHost> service_worker_filter = |
| 1138 new ServiceWorkerDispatcherHost( | 1138 new ServiceWorkerDispatcherHost( |
| 1139 GetID(), message_port_message_filter_.get(), resource_context, | 1139 GetID(), message_port_message_filter_.get(), resource_context); |
| 1140 base::Bind(&RenderProcessHostImpl::CreateURLLoaderFactory, | |
| 1141 weak_factory_.GetWeakPtr())); | |
| 1142 service_worker_filter->Init( | 1140 service_worker_filter->Init( |
| 1143 storage_partition_impl_->GetServiceWorkerContext()); | 1141 storage_partition_impl_->GetServiceWorkerContext()); |
| 1144 AddFilter(service_worker_filter.get()); | 1142 AddFilter(service_worker_filter.get()); |
| 1145 | 1143 |
| 1146 AddFilter(new SharedWorkerMessageFilter( | 1144 AddFilter(new SharedWorkerMessageFilter( |
| 1147 GetID(), resource_context, | 1145 GetID(), resource_context, |
| 1148 WorkerStoragePartition( | 1146 WorkerStoragePartition( |
| 1149 storage_partition_impl_->GetURLRequestContext(), | 1147 storage_partition_impl_->GetURLRequestContext(), |
| 1150 storage_partition_impl_->GetMediaURLRequestContext(), | 1148 storage_partition_impl_->GetMediaURLRequestContext(), |
| 1151 storage_partition_impl_->GetAppCacheService(), | 1149 storage_partition_impl_->GetAppCacheService(), |
| (...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2977 const std::string& error) { | 2975 const std::string& error) { |
| 2978 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2976 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 2979 | 2977 |
| 2980 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2978 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 2981 // enough information here so that we can determine what the bad message was. | 2979 // enough information here so that we can determine what the bad message was. |
| 2982 base::debug::Alias(&error); | 2980 base::debug::Alias(&error); |
| 2983 bad_message::ReceivedBadMessage(render_process_id, | 2981 bad_message::ReceivedBadMessage(render_process_id, |
| 2984 bad_message::RPH_MOJO_PROCESS_ERROR); | 2982 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 2985 } | 2983 } |
| 2986 | 2984 |
| 2987 void RenderProcessHostImpl::CreateURLLoaderFactory( | |
| 2988 mojo::InterfaceRequest<mojom::URLLoaderFactory> request) { | |
| 2989 URLLoaderFactoryImpl::Create(resource_message_filter_, std::move(request)); | |
| 2990 } | |
| 2991 | |
| 2992 } // namespace content | 2985 } // namespace content |
| OLD | NEW |