Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: content/browser/worker_host/worker_process_host.cc

Issue 213423008: Add pause_on_start flag to WorkerProcessMsg_CreateWorker_Params. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated yurys's comment Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 render_process_id, 316 render_process_id,
317 request_context_callback, 317 request_context_callback,
318 resource_context_); 318 resource_context_);
319 socket_stream_dispatcher_host_ = socket_stream_dispatcher_host; 319 socket_stream_dispatcher_host_ = socket_stream_dispatcher_host;
320 process_->AddFilter(socket_stream_dispatcher_host); 320 process_->AddFilter(socket_stream_dispatcher_host);
321 process_->AddFilter(new WorkerDevToolsMessageFilter(process_->GetData().id)); 321 process_->AddFilter(new WorkerDevToolsMessageFilter(process_->GetData().id));
322 process_->AddFilter( 322 process_->AddFilter(
323 new IndexedDBDispatcherHost(partition_.indexed_db_context())); 323 new IndexedDBDispatcherHost(partition_.indexed_db_context()));
324 } 324 }
325 325
326 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { 326 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance,
327 bool pause_on_start) {
327 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( 328 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL(
328 process_->GetData().id, instance.url()); 329 process_->GetData().id, instance.url());
329 330
330 instances_.push_back(instance); 331 instances_.push_back(instance);
331 332
332 WorkerProcessMsg_CreateWorker_Params params; 333 WorkerProcessMsg_CreateWorker_Params params;
333 params.url = instance.url(); 334 params.url = instance.url();
334 params.name = instance.name(); 335 params.name = instance.name();
335 params.content_security_policy = instance.content_security_policy(); 336 params.content_security_policy = instance.content_security_policy();
336 params.security_policy_type = instance.security_policy_type(); 337 params.security_policy_type = instance.security_policy_type();
338 params.pause_on_start = pause_on_start;
337 params.route_id = instance.worker_route_id(); 339 params.route_id = instance.worker_route_id();
338 Send(new WorkerProcessMsg_CreateWorker(params)); 340 Send(new WorkerProcessMsg_CreateWorker(params));
339 341
340 UpdateTitle(); 342 UpdateTitle();
341 343
342 // Walk all pending filters and let them know the worker has been created 344 // Walk all pending filters and let them know the worker has been created
343 // (could be more than one in the case where we had to queue up worker 345 // (could be more than one in the case where we had to queue up worker
344 // creation because the worker process limit was reached). 346 // creation because the worker process limit was reached).
345 for (WorkerInstance::FilterList::const_iterator i = 347 for (WorkerInstance::FilterList::const_iterator i =
346 instance.filters().begin(); 348 instance.filters().begin();
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 return false; 825 return false;
824 } 826 }
825 827
826 WorkerProcessHost::WorkerInstance::FilterInfo 828 WorkerProcessHost::WorkerInstance::FilterInfo
827 WorkerProcessHost::WorkerInstance::GetFilter() const { 829 WorkerProcessHost::WorkerInstance::GetFilter() const {
828 DCHECK(NumFilters() == 1); 830 DCHECK(NumFilters() == 1);
829 return *filters_.begin(); 831 return *filters_.begin();
830 } 832 }
831 833
832 } // namespace content 834 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/worker_host/worker_process_host.h ('k') | content/browser/worker_host/worker_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698