diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 03:46:57 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-18 03:46:57 +0000 |
commit | c1f50aa589d83b9725d4b7f19559eb94c006d818 (patch) | |
tree | 87f205ba59418713a3836e52040775ad9bb9fc13 /chrome/renderer/print_web_view_helper_mac.mm | |
parent | 4dd29e72c2c234fbffb0c6bf901ee8ccfb2f5637 (diff) | |
download | chromium_src-c1f50aa589d83b9725d4b7f19559eb94c006d818.zip chromium_src-c1f50aa589d83b9725d4b7f19559eb94c006d818.tar.gz chromium_src-c1f50aa589d83b9725d4b7f19559eb94c006d818.tar.bz2 |
Modal loops of joy.
We need to pump messages in the renderer and in any related plugin processes
when sending sync IPCs to get cookies and set localstorage items because these
IPCs can block on a user prompt.
This code moves complexity into RenderThread::Send(). That function is now
responsible for calling WebView::{willEnter,didExit}ModalLoop() and for
broadcasting the messages to signal/reset modal dialog events in the related
plugin processes.
This change also adds code to optionally suspend the shared webkit timer. This
was needed to fix bug 36063. It also helps make spinning a nested loop to wait
for document.cookie results a bit less risky since we'll be re-entering WebKit
in fewer cases.
R=jam
BUG=34917,36063
TEST=none
Review URL: http://codereview.chromium.org/607011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper_mac.mm')
-rw-r--r-- | chrome/renderer/print_web_view_helper_mac.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/renderer/print_web_view_helper_mac.mm b/chrome/renderer/print_web_view_helper_mac.mm index 6e2cc2d..96113fb 100644 --- a/chrome/renderer/print_web_view_helper_mac.mm +++ b/chrome/renderer/print_web_view_helper_mac.mm @@ -102,8 +102,10 @@ void PrintWebViewHelper::Print(WebFrame* frame, bool script_initiated) { params.has_selection = frame->hasSelection(); params.expected_pages_count = expected_pages_count; - msg = new ViewHostMsg_ScriptedPrint(params, &print_settings); - if (render_view_->SendAndRunNestedMessageLoop(msg)) { + msg = new ViewHostMsg_ScriptedPrint(routing_id(), params, + &print_settings); + msg->EnableMessagePumping(); + if (Send(msg)) { msg = NULL; // If the settings are invalid, early quit. |