OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/debugger/worker_devtools_manager.h" | 5 #include "content/browser/debugger/worker_devtools_manager.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 282 |
283 WorkerDevToolsManager::~WorkerDevToolsManager() { | 283 WorkerDevToolsManager::~WorkerDevToolsManager() { |
284 } | 284 } |
285 | 285 |
286 void WorkerDevToolsManager::WorkerCreated( | 286 void WorkerDevToolsManager::WorkerCreated( |
287 WorkerProcessHost* worker, | 287 WorkerProcessHost* worker, |
288 const WorkerProcessHost::WorkerInstance& instance) { | 288 const WorkerProcessHost::WorkerInstance& instance) { |
289 for (TerminatedInspectedWorkers::iterator it = terminated_workers_.begin(); | 289 for (TerminatedInspectedWorkers::iterator it = terminated_workers_.begin(); |
290 it != terminated_workers_.end(); ++it) { | 290 it != terminated_workers_.end(); ++it) { |
291 if (instance.Matches(it->worker_url, it->worker_name, | 291 if (instance.Matches(it->worker_url, it->worker_name, |
| 292 instance.partition(), |
292 instance.resource_context())) { | 293 instance.resource_context())) { |
293 worker->Send(new DevToolsAgentMsg_PauseWorkerContextOnStart( | 294 worker->Send(new DevToolsAgentMsg_PauseWorkerContextOnStart( |
294 instance.worker_route_id())); | 295 instance.worker_route_id())); |
295 WorkerId new_worker_id(worker->GetData().id, instance.worker_route_id()); | 296 WorkerId new_worker_id(worker->GetData().id, instance.worker_route_id()); |
296 paused_workers_[new_worker_id] = it->old_worker_id; | 297 paused_workers_[new_worker_id] = it->old_worker_id; |
297 terminated_workers_.erase(it); | 298 terminated_workers_.erase(it); |
298 return; | 299 return; |
299 } | 300 } |
300 } | 301 } |
301 } | 302 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 host->WorkerDestroyed(); | 489 host->WorkerDestroyed(); |
489 } | 490 } |
490 | 491 |
491 // static | 492 // static |
492 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) { | 493 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) { |
493 if (WorkerProcessHost* process = FindWorkerProcess(id.first)) | 494 if (WorkerProcessHost* process = FindWorkerProcess(id.first)) |
494 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second)); | 495 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second)); |
495 } | 496 } |
496 | 497 |
497 } // namespace | 498 } // namespace |
OLD | NEW |