From a96ec6a0045c0b1926c9e4c553b67e42a43a430b Mon Sep 17 00:00:00 2001 From: "stuartmorgan@chromium.org" Date: Wed, 4 Nov 2009 17:27:08 +0000 Subject: Don't allow the browser to stay above a modal plugin window (Mac) There's a flicker of the modal window being hidden then coming forward again, and the menus still work, so we'll most likely have fake the modality more aggressively at some point. This gets us the basic infrastructure though, and solves the severe usability problem. BUG=20798 TEST=Open a modal plugin window (e.g., Gmail upload). Switch to another app, then back to Chrome; the plugin window should come to the front. Review URL: http://codereview.chromium.org/355021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30965 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/plugin/plugin_thread.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'chrome/plugin/plugin_thread.cc') diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index 5969089..85caf16 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -166,22 +166,26 @@ bool GetPluginFinderURL(std::string* plugin_finder_url) { #if defined(OS_MACOSX) __attribute__((visibility("default"))) -void NotifyBrowserOfPluginSelectWindow(uint32 window_id, CGRect bounds) { +void NotifyBrowserOfPluginSelectWindow(uint32 window_id, CGRect bounds, + bool modal) { PluginThread* plugin_thread = PluginThread::current(); if (plugin_thread) { gfx::Rect window_bounds(bounds); plugin_thread->Send( - new PluginProcessHostMsg_PluginSelectWindow(window_id, window_bounds)); + new PluginProcessHostMsg_PluginSelectWindow(window_id, window_bounds, + modal)); } } __attribute__((visibility("default"))) -void NotifyBrowserOfPluginShowWindow(uint32 window_id, CGRect bounds) { +void NotifyBrowserOfPluginShowWindow(uint32 window_id, CGRect bounds, + bool modal) { PluginThread* plugin_thread = PluginThread::current(); if (plugin_thread) { gfx::Rect window_bounds(bounds); plugin_thread->Send( - new PluginProcessHostMsg_PluginShowWindow(window_id, window_bounds)); + new PluginProcessHostMsg_PluginShowWindow(window_id, window_bounds, + modal)); } } -- cgit v1.1