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

Unified Diff: chrome/browser/ui/views/extensions/extension_dialog.cc

Issue 9360005: Handle termination/crashes of an extension hosted in the ExtensionDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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/ui/views/extensions/extension_dialog.cc
diff --git a/chrome/browser/ui/views/extensions/extension_dialog.cc b/chrome/browser/ui/views/extensions/extension_dialog.cc
index 08f4e7548f008691380c3863bbf476c858f1ab29..a38886fed9169d4328e8eedf671f64cd90acf628 100644
--- a/chrome/browser/ui/views/extensions/extension_dialog.cc
+++ b/chrome/browser/ui/views/extensions/extension_dialog.cc
@@ -36,6 +36,9 @@ ExtensionDialog::ExtensionDialog(ExtensionHost* host,
// Listen for the containing view calling window.close();
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
content::Source<Profile>(host->profile()));
+ // Listen for a crash or other termination of the extension process.
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
+ content::Source<Profile>(host->profile()));
}
ExtensionDialog::~ExtensionDialog() {
@@ -173,6 +176,12 @@ void ExtensionDialog::Observe(int type,
return;
Close();
break;
+ case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED:
+ if (content::Details<ExtensionHost>(host()) != details)
+ return;
+ if (observer_)
+ observer_->ExtensionTerminated(this);
+ break;
default:
NOTREACHED() << L"Received unexpected notification";
break;
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/ui/views/extensions/extension_dialog_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698