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/common/render_messages_internal.h | |
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/common/render_messages_internal.h')
-rw-r--r-- | chrome/common/render_messages_internal.h | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index eeba87e..208a280 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -1112,18 +1112,20 @@ IPC_BEGIN_MESSAGES(ViewHost) GURL /* first_party_for_cookies */, std::string /* cookie */) - // Used to get cookies for the given URL - IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetCookies, - GURL /* url */, - GURL /* first_party_for_cookies */, - std::string /* cookies */) + // Used to get cookies for the given URL. This may be blocked by a user + // prompt to validate a previous SetCookie message. + IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies, + GURL /* url */, + GURL /* first_party_for_cookies */, + std::string /* cookies */) - // Used to get raw cookie information for the given URL - IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetRawCookies, - GURL /* url */, - GURL /* first_party_for_cookies */, - std::vector<webkit_glue::WebCookie> - /* raw_cookies */) + // Used to get raw cookie information for the given URL. This may be blocked + // by a user prompt to validate a previous SetCookie message. + IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetRawCookies, + GURL /* url */, + GURL /* first_party_for_cookies */, + std::vector<webkit_glue::WebCookie> + /* raw_cookies */) // Used to delete cookie for the given URL and name IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie, @@ -1458,10 +1460,10 @@ IPC_BEGIN_MESSAGES(ViewHost) // by javascript. This step is about showing UI to the user to select the // final print settings. The output parameter is the same as // ViewMsg_PrintPages which is executed implicitly. - IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_ScriptedPrint, - ViewHostMsg_ScriptedPrint_Params, - ViewMsg_PrintPages_Params /* settings choosen by - the user*/) + IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_ScriptedPrint, + ViewHostMsg_ScriptedPrint_Params, + ViewMsg_PrintPages_Params + /* settings choosen by the user*/) #endif // defined(OS_WIN) || defined(OS_MACOSX) // WebKit and JavaScript error messages to log to the console @@ -1981,13 +1983,13 @@ IPC_BEGIN_MESSAGES(ViewHost) NullableString16 /* value */) // Set a value that's associated with a key in a storage area. - IPC_SYNC_MESSAGE_CONTROL4_2(ViewHostMsg_DOMStorageSetItem, - int64 /* storage_area_id */, - string16 /* key */, - string16 /* value */, - GURL /* url */, - WebKit::WebStorageArea::Result /* result */, - NullableString16 /* old_value */) + IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_DOMStorageSetItem, + int64 /* storage_area_id */, + string16 /* key */, + string16 /* value */, + GURL /* url */, + WebKit::WebStorageArea::Result /* result */, + NullableString16 /* old_value */) // Remove the value associated with a key in a storage area. IPC_SYNC_MESSAGE_CONTROL3_1(ViewHostMsg_DOMStorageRemoveItem, |