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

Side by Side Diff: content/browser/debugger/worker_devtools_manager.cc

Issue 9052007: Create an API around WorkerService that chrome consumes. Rename the existing WorkerService to Wor... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
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"
11 #include "content/browser/debugger/devtools_agent_host.h" 11 #include "content/browser/debugger/devtools_agent_host.h"
12 #include "content/browser/debugger/devtools_manager_impl.h" 12 #include "content/browser/debugger/devtools_manager_impl.h"
13 #include "content/browser/debugger/worker_devtools_message_filter.h" 13 #include "content/browser/debugger/worker_devtools_message_filter.h"
14 #include "content/browser/worker_host/worker_process_host.h" 14 #include "content/browser/worker_host/worker_process_host.h"
15 #include "content/browser/worker_host/worker_service.h" 15 #include "content/browser/worker_host/worker_service_impl.h"
16 #include "content/common/devtools_messages.h" 16 #include "content/common/devtools_messages.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/devtools_agent_host_registry.h" 18 #include "content/public/browser/devtools_agent_host_registry.h"
19 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
21 #include "content/public/browser/notification_service.h" 21 #include "content/public/browser/notification_service.h"
22 #include "content/public/browser/notification_types.h" 22 #include "content/public/browser/notification_types.h"
23 #include "content/public/common/process_type.h" 23 #include "content/public/common/process_type.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " 24 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h "
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 int worker_process_id, 270 int worker_process_id,
271 int worker_route_id) { 271 int worker_route_id) {
272 WorkerId id(worker_process_id, worker_route_id); 272 WorkerId id(worker_process_id, worker_route_id);
273 WorkerDevToolsAgentHost* result = AgentHosts::GetAgentHost(id); 273 WorkerDevToolsAgentHost* result = AgentHosts::GetAgentHost(id);
274 if (!result) 274 if (!result)
275 result = new WorkerDevToolsAgentHost(id); 275 result = new WorkerDevToolsAgentHost(id);
276 return result; 276 return result;
277 } 277 }
278 278
279 WorkerDevToolsManager::WorkerDevToolsManager() { 279 WorkerDevToolsManager::WorkerDevToolsManager() {
280 WorkerService::GetInstance()->AddObserver(this); 280 WorkerServiceImpl::GetInstance()->AddObserver(this);
281 } 281 }
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) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 host->WorkerDestroyed(); 489 host->WorkerDestroyed();
490 } 490 }
491 491
492 // static 492 // static
493 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) { 493 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) {
494 if (WorkerProcessHost* process = FindWorkerProcess(id.first)) 494 if (WorkerProcessHost* process = FindWorkerProcess(id.first))
495 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second)); 495 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second));
496 } 496 }
497 497
498 } // namespace 498 } // namespace
OLDNEW
« no previous file with comments | « content/browser/debugger/worker_devtools_manager.h ('k') | content/browser/debugger/worker_devtools_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698