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

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

Issue 8399007: Removing dedicated worker-related IPC codei (first round). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: CR feedback Created 9 years, 1 month 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) 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/tuple.h" 10 #include "base/tuple.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return NULL; 357 return NULL;
358 } 358 }
359 359
360 void WorkerDevToolsManager::RegisterDevToolsAgentHostForWorker( 360 void WorkerDevToolsManager::RegisterDevToolsAgentHostForWorker(
361 int worker_process_id, 361 int worker_process_id,
362 int worker_route_id) { 362 int worker_route_id) {
363 if (WorkerProcessHost* process = FindWorkerProcess(worker_process_id)) { 363 if (WorkerProcessHost* process = FindWorkerProcess(worker_process_id)) {
364 const WorkerProcessHost::Instances& instances = process->instances(); 364 const WorkerProcessHost::Instances& instances = process->instances();
365 for (WorkerProcessHost::Instances::const_iterator i = instances.begin(); 365 for (WorkerProcessHost::Instances::const_iterator i = instances.begin();
366 i != instances.end(); ++i) { 366 i != instances.end(); ++i) {
367 if (i->shared() && i->worker_route_id() == worker_route_id) { 367 if (i->worker_route_id() == worker_route_id) {
368 DCHECK(FindInspectedWorker(worker_process_id, worker_route_id) == 368 DCHECK(FindInspectedWorker(worker_process_id, worker_route_id) ==
369 inspected_workers_.end()); 369 inspected_workers_.end());
370 inspected_workers_.push_back( 370 inspected_workers_.push_back(
371 InspectedWorker(process, worker_route_id, i->url(), i->name())); 371 InspectedWorker(process, worker_route_id, i->url(), i->name()));
372 return; 372 return;
373 } 373 }
374 } 374 }
375 } 375 }
376 NotifyWorkerDestroyedOnIOThread(worker_process_id, worker_route_id); 376 NotifyWorkerDestroyedOnIOThread(worker_process_id, worker_route_id);
377 } 377 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 if (host) 467 if (host)
468 host->WorkerDestroyed(); 468 host->WorkerDestroyed();
469 } 469 }
470 470
471 // static 471 // static
472 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) { 472 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) {
473 if (WorkerProcessHost* process = FindWorkerProcess(id.first)) 473 if (WorkerProcessHost* process = FindWorkerProcess(id.first))
474 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second)); 474 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second));
475 } 475 }
476 476
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/worker_host/worker_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698