diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 23:28:40 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 23:28:40 +0000 |
commit | c82d09a2c37cfcf286fd1a82f18c08d5d52bbc5e (patch) | |
tree | b77563ef856664ce69ebd9678157eb3c5318e63a /chrome_frame/chrome_frame_automation.cc | |
parent | 65567155035ec2cb68b6e8aac576bda6a0ed4f35 (diff) | |
download | chromium_src-c82d09a2c37cfcf286fd1a82f18c08d5d52bbc5e.zip chromium_src-c82d09a2c37cfcf286fd1a82f18c08d5d52bbc5e.tar.gz chromium_src-c82d09a2c37cfcf286fd1a82f18c08d5d52bbc5e.tar.bz2 |
Reenable the ChromeFrame unload event test which basically loads a page which in its unload handler sets
a cookie which the new page attempts to read. This does not work as expected in ChromeFrame as the cookie
reading and writing attempts are routed to the host browser, in this case IE which is waiting for the
WM_DESTROY message sent to the external tab to return.
Fix is to process the AutomationMsg_GetCookiesFromHost and AutomationMsg_SetCookieAsync IPC messages
in the background thread which works in IE. For Firefox they continue to be processed on the UI thread
as before.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=37231
Bug=37231
Review URL: http://codereview.chromium.org/1342004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index bf11755..295bb48 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -1012,6 +1012,28 @@ bool ChromeFrameAutomationClient::ProcessUrlRequestMessage(TabProxy* tab, AutomationMsg_DownloadRequestInHost::Dispatch(&msg, url_fetcher_, &PluginUrlRequestManager::DownloadUrlRequestInHost); break; + + case AutomationMsg_GetCookiesFromHost::ID: { + if (invoke) { + // If the PluginUrlRequestManager does not handle the GetCookies + // request then fall through to the original handling which sends + // the request to the delegate. + invoke = AutomationMsg_GetCookiesFromHost::Dispatch(&msg, url_fetcher_, + &PluginUrlRequestManager::GetCookiesFromHost); + } + break; + } + + case AutomationMsg_SetCookieAsync::ID: { + if (invoke) { + // If the PluginUrlRequestManager does not handle the SetCookies + // request then fall through to the original handling which sends + // the request to the delegate. + invoke = AutomationMsg_SetCookieAsync::Dispatch(&msg, url_fetcher_, + &PluginUrlRequestManager::SetCookiesInHost); + } + break; + } } if (!invoke) { @@ -1282,3 +1304,10 @@ void ChromeFrameAutomationClient::OnResponseEnd(int request_id, request_id, status)); } +bool ChromeFrameAutomationClient::SendIPCMessage(IPC::Message* msg) { + if (automation_server_) + return automation_server_->Send(msg); + return false; +} + + |