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

Unified Diff: chrome/browser/app_modal_dialog.h

Issue 435014: Merge 32889 - Fix crash when an extension popup shows a JS alert. Showing the... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years, 1 month 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/app_modal_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_modal_dialog.h
===================================================================
--- chrome/browser/app_modal_dialog.h (revision 32899)
+++ chrome/browser/app_modal_dialog.h (working copy)
@@ -21,6 +21,7 @@
typedef void* NativeDialog;
#endif
+class ExtensionHost;
class JavaScriptMessageBoxClient;
class TabContents;
namespace IPC {
@@ -96,8 +97,9 @@
const NotificationSource& source,
const NotificationDetails& details);
- // Sends APP_MODAL_DIALOG_CLOSED notification.
- void SendCloseNotification();
+ // Cleans up after the dialog closes for any reason: sends close
+ // notification and re-enables input events.
+ void Cleanup();
NotificationRegistrar registrar_;
@@ -108,6 +110,13 @@
// and receive results.
JavaScriptMessageBoxClient* client_;
+ // The client_ as an ExtensionHost, cached for use during notifications that
+ // may arrive after the client has entered its destructor (and is thus
+ // treated as a base JavaScriptMessageBoxClient). This will be NULL if the
+ // client is not an ExtensionHost.
+ TabContents* tab_contents_;
+ ExtensionHost* extension_host_;
+
// True if the dialog should no longer be shown, e.g. because the underlying
// tab navigated away while the dialog was queued.
bool skip_this_dialog_;
« no previous file with comments | « no previous file | chrome/browser/app_modal_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698