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

Unified Diff: content/browser/devtools/protocol/target_handler.cc

Issue 2927063003: Revert of [DevTools] Show icon in top toolbar when Node target is available (patchset #3 id:40001 o… (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/protocol/target_handler.h ('k') | third_party/WebKit/Source/devtools/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/target_handler.cc
diff --git a/content/browser/devtools/protocol/target_handler.cc b/content/browser/devtools/protocol/target_handler.cc
index 8b982c8a9186764405f8956d885bfb25c0dbb8ee..6ce10663f85ae482733daf7d4904b1f9b2b66e01 100644
--- a/content/browser/devtools/protocol/target_handler.cc
+++ b/content/browser/devtools/protocol/target_handler.cc
@@ -223,11 +223,9 @@ void TargetHandler::TargetDestroyedInternal(
bool TargetHandler::AttachToTargetInternal(
DevToolsAgentHost* host, bool waiting_for_debugger) {
- attached_hosts_[host->GetId()] = host;
- if (!host->AttachClient(this)) {
- attached_hosts_.erase(host->GetId());
+ if (!host->AttachClient(this))
return false;
- }
+ attached_hosts_[host->GetId()] = host;
frontend_->AttachedToTarget(CreateInfo(host), waiting_for_debugger);
return true;
}
@@ -417,8 +415,6 @@ bool TargetHandler::ShouldForceDevToolsAgentHostCreation() {
}
void TargetHandler::DevToolsAgentHostCreated(DevToolsAgentHost* agent_host) {
- if (agent_host->GetType() == "node" && agent_host->IsAttached())
- return;
// If we start discovering late, all existing agent hosts will be reported,
// but we could have already attached to some.
TargetCreatedInternal(agent_host);
@@ -429,22 +425,6 @@ void TargetHandler::DevToolsAgentHostDestroyed(DevToolsAgentHost* agent_host) {
TargetDestroyedInternal(agent_host);
}
-void TargetHandler::DevToolsAgentHostAttached(DevToolsAgentHost* host) {
- if (host->GetType() == "node" &&
- reported_hosts_.find(host->GetId()) != reported_hosts_.end() &&
- attached_hosts_.find(host->GetId()) == attached_hosts_.end()) {
- TargetDestroyedInternal(host);
- }
-}
-
-void TargetHandler::DevToolsAgentHostDetached(DevToolsAgentHost* host) {
- if (host->GetType() == "node" &&
- reported_hosts_.find(host->GetId()) == reported_hosts_.end() &&
- attached_hosts_.find(host->GetId()) == attached_hosts_.end()) {
- TargetCreatedInternal(host);
- }
-}
-
// -------- ServiceWorkerDevToolsManager::Observer ----------
void TargetHandler::WorkerCreated(
« no previous file with comments | « content/browser/devtools/protocol/target_handler.h ('k') | third_party/WebKit/Source/devtools/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698