summaryrefslogtreecommitdiffstats
path: root/views/window/dialog_client_view.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 19:34:02 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 19:34:02 +0000
commit571e31155b13e96295c3423c2da5280c3242e2ac (patch)
treec4552eb1cfda07e6a168a7b9f91870c2e379120e /views/window/dialog_client_view.h
parent347462e28144797eb7eeada2e9c167dcc29065f2 (diff)
downloadchromium_src-571e31155b13e96295c3423c2da5280c3242e2ac.zip
chromium_src-571e31155b13e96295c3423c2da5280c3242e2ac.tar.gz
chromium_src-571e31155b13e96295c3423c2da5280c3242e2ac.tar.bz2
Displaying consecutive alerts from plugins should not hang the browser. The plugins display alerts via the NPN_Evaluate API. The browser signals an event handle to ensure that the plugin starts peeking for messages while waiting for the NPN_Evaluate call to return. When the dialog is dismissed by the user, windows does send some messages to the plugin window underneath, like activation messages, etc. These don't get dispatched as the event is reset when the dialog is dismissed, i.e. much before the window is actually
destroyed. The fix is to reset the event handle after the window is actually destroyed. To achieve this I added an OnClose virtual function to the DialogDelegate interface, which is overridden by the JavascriptMessageBoxDialog class which eventually ensures that the event is reset. This fixes http://code.google.com/p/chromium/issues/detail?id=10799 I updated the AlertInWindowMessage npapi test to display two alerts instead of one. Bug=10799 Review URL: http://codereview.chromium.org/113464 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window/dialog_client_view.h')
-rw-r--r--views/window/dialog_client_view.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/views/window/dialog_client_view.h b/views/window/dialog_client_view.h
index ecb9449..5d1fa33 100644
--- a/views/window/dialog_client_view.h
+++ b/views/window/dialog_client_view.h
@@ -95,6 +95,9 @@ class DialogClientView : public ClientView,
// Returns the DialogDelegate for the window.
DialogDelegate* GetDialogDelegate() const;
+ // Closes the window.
+ void Close();
+
// The dialog buttons.
NativeButton* ok_button_;
NativeButton* cancel_button_;