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

Unified Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 2047833002: DevTools: introduce browser domain for basic target discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/browser/devtools/devtools_ui_bindings.cc
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc
index 26a1e03e271da42340547671c37a4aa8682d29d1..cccc6e6f9b13b28ce221f2504eca062d3af08c16 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -422,7 +422,7 @@ DevToolsUIBindings::~DevToolsUIBindings() {
delete pair.first;
if (agent_host_.get())
- agent_host_->DetachClient();
+ agent_host_->DetachClient(this);
for (IndexingJobsMap::const_iterator jobs_it(indexing_jobs_.begin());
jobs_it != indexing_jobs_.end(); ++jobs_it) {
@@ -1032,7 +1032,9 @@ void DevToolsUIBindings::AttachTo(
if (agent_host_.get())
Detach();
agent_host_ = agent_host;
- agent_host_->AttachClient(this);
+ // DevToolsUIBindings terminates existing debugging connections and starts
+ // debugging.
+ agent_host_->ForceAttachClient(this);
}
void DevToolsUIBindings::Reattach() {
@@ -1042,7 +1044,7 @@ void DevToolsUIBindings::Reattach() {
void DevToolsUIBindings::Detach() {
if (agent_host_.get())
- agent_host_->DetachClient();
+ agent_host_->DetachClient(this);
agent_host_ = NULL;
}
@@ -1077,7 +1079,7 @@ void DevToolsUIBindings::DocumentAvailableInMainFrame() {
if (!reattaching_)
return;
reattaching_ = false;
- agent_host_->DetachClient();
+ agent_host_->DetachClient(this);
agent_host_->AttachClient(this);
}

Powered by Google App Engine
This is Rietveld 408576698