summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 18:04:11 +0000
committerdgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-14 18:04:11 +0000
commit7a0438de4a6e232056fc3adacc5ca2b6acb87bce (patch)
tree82c3056d704e10485b6d080bcf9a6084ddd09c60
parent6b793a3cb61c3d3a19827adc8c55013222a9313f (diff)
downloadchromium_src-7a0438de4a6e232056fc3adacc5ca2b6acb87bce.zip
chromium_src-7a0438de4a6e232056fc3adacc5ca2b6acb87bce.tar.gz
chromium_src-7a0438de4a6e232056fc3adacc5ca2b6acb87bce.tar.bz2
DevTools: close devtools window when devtools frontend crashes.
BUG=249322 TEST=manual, see bug. Review URL: https://chromiumcodereview.appspot.com/17070003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206447 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/devtools/devtools_frontend_host.cc13
-rw-r--r--content/browser/devtools/devtools_frontend_host.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/content/browser/devtools/devtools_frontend_host.cc b/content/browser/devtools/devtools_frontend_host.cc
index 3c8177a..5181c6b 100644
--- a/content/browser/devtools/devtools_frontend_host.cc
+++ b/content/browser/devtools/devtools_frontend_host.cc
@@ -82,6 +82,19 @@ bool DevToolsFrontendHost::OnMessageReceived(
return handled;
}
+void DevToolsFrontendHost::RenderViewGone(
+ base::TerminationStatus status) {
+ switch(status) {
+ case base::TERMINATION_STATUS_ABNORMAL_TERMINATION:
+ case base::TERMINATION_STATUS_PROCESS_WAS_KILLED:
+ case base::TERMINATION_STATUS_PROCESS_CRASHED:
+ DevToolsManager::GetInstance()->ClientHostClosing(this);
+ break;
+ default:
+ break;
+ }
+}
+
void DevToolsFrontendHost::OnDispatchOnInspectorBackend(
const std::string& message) {
DevToolsManagerImpl::GetInstance()->DispatchOnInspectorBackend(this, message);
diff --git a/content/browser/devtools/devtools_frontend_host.h b/content/browser/devtools/devtools_frontend_host.h
index 5c4924d..9332d73 100644
--- a/content/browser/devtools/devtools_frontend_host.h
+++ b/content/browser/devtools/devtools_frontend_host.h
@@ -37,6 +37,7 @@ class DevToolsFrontendHost : public DevToolsClientHost,
// WebContentsObserver overrides.
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
void OnDispatchOnInspectorBackend(const std::string& message);
void OnActivateWindow();