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

Side by Side Diff: content/browser/devtools/protocol/target_handler.cc

Issue 2625223002: [DevTools] Dedicated frontend for debugging Node. (Closed)
Patch Set: test fix Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/devtools/protocol/target_handler.h" 5 #include "content/browser/devtools/protocol/target_handler.h"
6 6
7 #include "content/browser/devtools/devtools_manager.h" 7 #include "content/browser/devtools/devtools_manager.h"
8 #include "content/browser/devtools/devtools_session.h" 8 #include "content/browser/devtools/devtools_session.h"
9 #include "content/browser/devtools/service_worker_devtools_agent_host.h" 9 #include "content/browser/devtools/service_worker_devtools_agent_host.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 attached_hosts_.erase(host->GetId()); 405 attached_hosts_.erase(host->GetId());
406 } 406 }
407 407
408 // -------------- DevToolsAgentHostObserver ----------------- 408 // -------------- DevToolsAgentHostObserver -----------------
409 409
410 bool TargetHandler::ShouldForceDevToolsAgentHostCreation() { 410 bool TargetHandler::ShouldForceDevToolsAgentHostCreation() {
411 return true; 411 return true;
412 } 412 }
413 413
414 void TargetHandler::DevToolsAgentHostCreated(DevToolsAgentHost* agent_host) { 414 void TargetHandler::DevToolsAgentHostCreated(DevToolsAgentHost* agent_host) {
415 DCHECK(attached_hosts_.find(agent_host->GetId()) == attached_hosts_.end()); 415 // If we start discovering late, all existing agent hosts will be reported,
416 // but we could have already attached to some.
416 TargetCreatedInternal(agent_host); 417 TargetCreatedInternal(agent_host);
417 } 418 }
418 419
419 void TargetHandler::DevToolsAgentHostDestroyed(DevToolsAgentHost* agent_host) { 420 void TargetHandler::DevToolsAgentHostDestroyed(DevToolsAgentHost* agent_host) {
420 DCHECK(attached_hosts_.find(agent_host->GetId()) == attached_hosts_.end()); 421 DCHECK(attached_hosts_.find(agent_host->GetId()) == attached_hosts_.end());
421 TargetDestroyedInternal(agent_host); 422 TargetDestroyedInternal(agent_host);
422 } 423 }
423 424
424 // -------- ServiceWorkerDevToolsManager::Observer ---------- 425 // -------- ServiceWorkerDevToolsManager::Observer ----------
425 426
(...skipping 30 matching lines...) Expand all
456 UpdateServiceWorkers(); 457 UpdateServiceWorkers();
457 } 458 }
458 459
459 void TargetHandler::WorkerDestroyed( 460 void TargetHandler::WorkerDestroyed(
460 ServiceWorkerDevToolsAgentHost* host) { 461 ServiceWorkerDevToolsAgentHost* host) {
461 UpdateServiceWorkers(); 462 UpdateServiceWorkers();
462 } 463 }
463 464
464 } // namespace protocol 465 } // namespace protocol
465 } // namespace content 466 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_session.cc ('k') | content/browser/devtools/render_frame_devtools_agent_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698