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

Unified Diff: chrome/browser/ui/views/select_file_dialog_extension.h

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/select_file_dialog_extension.h
diff --git a/chrome/browser/ui/views/select_file_dialog_extension.h b/chrome/browser/ui/views/select_file_dialog_extension.h
index 59f0ba294d79d881c151db088464721f193458a7..41e1117078a0bb053d83d95eb35387d07b9bb7a5 100644
--- a/chrome/browser/ui/views/select_file_dialog_extension.h
+++ b/chrome/browser/ui/views/select_file_dialog_extension.h
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/views/extensions/extension_dialog_observer.h"
#include "ui/gfx/native_widget_types.h" // gfx::NativeWindow
+class Browser;
class ExtensionDialog;
class RenderViewHost;
@@ -32,6 +33,7 @@ class SelectFileDialogExtension
// ExtensionDialog::Observer implementation.
virtual void ExtensionDialogClosing(ExtensionDialog* dialog) OVERRIDE;
+ virtual void ExtensionTerminated(ExtensionDialog* dialog) OVERRIDE;
// Routes callback to appropriate SelectFileDialog::Listener based on
// the owning |tab_id|.
@@ -83,6 +85,10 @@ class SelectFileDialogExtension
// ID of the tab that spawned this dialog, used to route callbacks.
int32 tab_id_;
+ // Cache a pointer to our owner browser. Since we're a child window of our
+ // owner browser, if this browser gets deleted, it will also close us.
+ Browser* owner_browser_;
+
gfx::NativeWindow owner_window_;
// We defer the callback into SelectFileDialog::Listener until the window

Powered by Google App Engine
This is Rietveld 408576698