| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // DevToolsAgentHost implementation. | 146 // DevToolsAgentHost implementation. |
| 147 virtual void SendMessageToAgent(IPC::Message* message) OVERRIDE { | 147 virtual void SendMessageToAgent(IPC::Message* message) OVERRIDE { |
| 148 BrowserThread::PostTask( | 148 BrowserThread::PostTask( |
| 149 BrowserThread::IO, FROM_HERE, | 149 BrowserThread::IO, FROM_HERE, |
| 150 base::Bind( | 150 base::Bind( |
| 151 &WorkerDevToolsAgentHost::ForwardToWorkerDevToolsAgent, | 151 &WorkerDevToolsAgentHost::ForwardToWorkerDevToolsAgent, |
| 152 worker_id_.first, | 152 worker_id_.first, |
| 153 worker_id_.second, | 153 worker_id_.second, |
| 154 *message)); | 154 *message)); |
| 155 } | 155 } |
| 156 virtual void NotifyClientClosing() OVERRIDE {} | 156 virtual void NotifyClientAttaching() OVERRIDE {} |
| 157 virtual void NotifyClientDetaching() OVERRIDE {} |
| 157 virtual int GetRenderProcessId() OVERRIDE { return -1; } | 158 virtual int GetRenderProcessId() OVERRIDE { return -1; } |
| 158 | 159 |
| 159 WorkerId worker_id_; | 160 WorkerId worker_id_; |
| 160 | 161 |
| 161 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgentHost); | 162 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgentHost); |
| 162 }; | 163 }; |
| 163 | 164 |
| 164 | 165 |
| 165 class WorkerDevToolsManager::DetachedClientHosts { | 166 class WorkerDevToolsManager::DetachedClientHosts { |
| 166 public: | 167 public: |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 host->WorkerDestroyed(); | 488 host->WorkerDestroyed(); |
| 488 } | 489 } |
| 489 | 490 |
| 490 // static | 491 // static |
| 491 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) { | 492 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) { |
| 492 if (WorkerProcessHost* process = FindWorkerProcess(id.first)) | 493 if (WorkerProcessHost* process = FindWorkerProcess(id.first)) |
| 493 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second)); | 494 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second)); |
| 494 } | 495 } |
| 495 | 496 |
| 496 } // namespace | 497 } // namespace |
| OLD | NEW |