OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/browser/worker_host/worker_process_host.h" | 5 #include "content/browser/worker_host/worker_process_host.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 content::GetDatabaseTrackerForResourceContext(resource_context_))); | 277 content::GetDatabaseTrackerForResourceContext(resource_context_))); |
278 | 278 |
279 SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 279 SocketStreamDispatcherHost* socket_stream_dispatcher_host = |
280 new SocketStreamDispatcherHost( | 280 new SocketStreamDispatcherHost( |
281 new URLRequestContextSelector(request_context), resource_context_); | 281 new URLRequestContextSelector(request_context), resource_context_); |
282 process_->GetHost()->AddFilter(socket_stream_dispatcher_host); | 282 process_->GetHost()->AddFilter(socket_stream_dispatcher_host); |
283 process_->GetHost()->AddFilter( | 283 process_->GetHost()->AddFilter( |
284 new content::WorkerDevToolsMessageFilter(process_->GetData().id)); | 284 new content::WorkerDevToolsMessageFilter(process_->GetData().id)); |
285 process_->GetHost()->AddFilter(new IndexedDBDispatcherHost( | 285 process_->GetHost()->AddFilter(new IndexedDBDispatcherHost( |
286 process_->GetData().id, | 286 process_->GetData().id, |
287 content::GetWebKitContextForResourceContext(resource_context_))); | 287 content::GetIndexedDBContextForResourceContext(resource_context_))); |
288 } | 288 } |
289 | 289 |
290 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { | 290 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { |
291 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( | 291 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( |
292 process_->GetData().id, instance.url()); | 292 process_->GetData().id, instance.url()); |
293 | 293 |
294 instances_.push_back(instance); | 294 instances_.push_back(instance); |
295 | 295 |
296 WorkerProcessMsg_CreateWorker_Params params; | 296 WorkerProcessMsg_CreateWorker_Params params; |
297 params.url = instance.url(); | 297 params.url = instance.url(); |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 } | 676 } |
677 } | 677 } |
678 return false; | 678 return false; |
679 } | 679 } |
680 | 680 |
681 WorkerProcessHost::WorkerInstance::FilterInfo | 681 WorkerProcessHost::WorkerInstance::FilterInfo |
682 WorkerProcessHost::WorkerInstance::GetFilter() const { | 682 WorkerProcessHost::WorkerInstance::GetFilter() const { |
683 DCHECK(NumFilters() == 1); | 683 DCHECK(NumFilters() == 1); |
684 return *filters_.begin(); | 684 return *filters_.begin(); |
685 } | 685 } |
OLD | NEW |