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

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

Issue 489893002: DevTools: add support for chrome-devtools://devtools/remote/open? URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed comment, guard by experiment Created 6 years, 4 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/ui/webui/devtools_ui.h » ('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 4588f4ab5e4b3e575113742fb970c401c398bf85..903deb53c6a8227b2e6c6e1e391bdffda325f1f1 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -794,7 +794,8 @@ void DevToolsUIBindings::SetDelegate(Delegate* delegate) {
}
void DevToolsUIBindings::AttachTo(content::DevToolsAgentHost* agent_host) {
- DCHECK(!agent_host_);
+ if (agent_host_)
+ Detach();
agent_host_ = agent_host;
agent_host_->AttachClient(this);
}
@@ -806,8 +807,8 @@ void DevToolsUIBindings::Reattach() {
}
void DevToolsUIBindings::Detach() {
- DCHECK(agent_host_);
- agent_host_->DetachClient();
+ if (agent_host_)
+ agent_host_->DetachClient();
agent_host_ = NULL;
}
« no previous file with comments | « no previous file | chrome/browser/ui/webui/devtools_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698