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_service_impl.h" | 5 #include "content/browser/worker_host/worker_service_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 // TODO(atwilson): This won't work if the message is from a worker process. | 402 // TODO(atwilson): This won't work if the message is from a worker process. |
403 // We don't support that yet though (this message is only sent from | 403 // We don't support that yet though (this message is only sent from |
404 // renderers) but when we do, we'll need to add code to pass in the current | 404 // renderers) but when we do, we'll need to add code to pass in the current |
405 // worker's document set for nested workers. | 405 // worker's document set for nested workers. |
406 if (!worker->Init(first_filter->render_process_id(), | 406 if (!worker->Init(first_filter->render_process_id(), |
407 instance.render_frame_id())) { | 407 instance.render_frame_id())) { |
408 delete worker; | 408 delete worker; |
409 return false; | 409 return false; |
410 } | 410 } |
411 | 411 |
412 worker->CreateWorker(instance); | 412 worker->CreateWorker( |
| 413 instance, |
| 414 WorkerDevToolsManager::GetInstance()->TerminatedWorkerExist(instance)); |
413 FOR_EACH_OBSERVER( | 415 FOR_EACH_OBSERVER( |
414 WorkerServiceObserver, observers_, | 416 WorkerServiceObserver, observers_, |
415 WorkerCreated(instance.url(), instance.name(), worker->GetData().id, | 417 WorkerCreated(instance.url(), instance.name(), worker->GetData().id, |
416 instance.worker_route_id())); | 418 instance.worker_route_id())); |
417 WorkerDevToolsManager::GetInstance()->WorkerCreated(worker, instance); | 419 WorkerDevToolsManager::GetInstance()->WorkerCreated(worker, instance); |
418 return true; | 420 return true; |
419 } | 421 } |
420 | 422 |
421 bool WorkerServiceImpl::CanCreateWorkerProcess( | 423 bool WorkerServiceImpl::CanCreateWorkerProcess( |
422 const WorkerProcessHost::WorkerInstance& instance) { | 424 const WorkerProcessHost::WorkerInstance& instance) { |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 instance_iter != iter->mutable_instances().end(); | 592 instance_iter != iter->mutable_instances().end(); |
591 ++instance_iter) { | 593 ++instance_iter) { |
592 if (instance_iter->Matches(url, name, partition, resource_context)) | 594 if (instance_iter->Matches(url, name, partition, resource_context)) |
593 return &(*instance_iter); | 595 return &(*instance_iter); |
594 } | 596 } |
595 } | 597 } |
596 return NULL; | 598 return NULL; |
597 } | 599 } |
598 | 600 |
599 } // namespace content | 601 } // namespace content |
OLD | NEW |