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

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: review comments addressed 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/debugger/debugger_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f901b8fa58d2a51103126e75f2ec5811f881d476 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) {
@@ -811,7 +811,7 @@ void DevToolsUIBindings::ReadyForTest() {
void DevToolsUIBindings::DispatchProtocolMessageFromDevToolsFrontend(
const std::string& message) {
if (agent_host_.get())
- agent_host_->DispatchProtocolMessage(message);
+ agent_host_->DispatchProtocolMessage(this, message);
}
void DevToolsUIBindings::RecordEnumeratedHistogram(const std::string& name,
@@ -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);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/debugger/debugger_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698