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

Unified Diff: webkit/glue/plugins/webplugin_delegate_impl.cc

Issue 29004: We allow Flash to popup windows in response to user gesture messages like WM_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/webplugin_delegate_impl.cc
===================================================================
--- webkit/glue/plugins/webplugin_delegate_impl.cc (revision 10275)
+++ webkit/glue/plugins/webplugin_delegate_impl.cc (working copy)
@@ -43,6 +43,12 @@
// this seems to work well enough.
const int kFlashWMUSERMessageThrottleDelayMs = 5;
+// Flash displays popups in response to user clicks by posting a WM_USER
+// message to the plugin window. The handler for this message displays
+// the popup. To ensure that the popups allowed state is sent correctly
+// to the renderer we reset the popups allowed state in a timer.
+const int kWindowedPluginPopupTimerMs = 50;
+
// The current instance of the plugin which entered the modal loop.
WebPluginDelegateImpl* g_current_plugin_instance = NULL;
@@ -884,9 +890,10 @@
delegate->instance()->PushPopupsEnabledState(true);
- MessageLoop::current()->PostTask(FROM_HERE,
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
delegate->user_gesture_msg_factory_.NewRunnableMethod(
- &WebPluginDelegateImpl::OnUserGestureEnd));
+ &WebPluginDelegateImpl::OnUserGestureEnd),
+ kWindowedPluginPopupTimerMs);
}
LRESULT result = CallWindowProc(delegate->plugin_wnd_proc_, hwnd, message,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698