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/plugin_url_request.h | |
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/plugin_url_request.h')
-rw-r--r-- | chrome_frame/plugin_url_request.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome_frame/plugin_url_request.h b/chrome_frame/plugin_url_request.h index 511dea7..9bfedb7 100644 --- a/chrome_frame/plugin_url_request.h +++ b/chrome_frame/plugin_url_request.h @@ -32,6 +32,9 @@ class DECLSPEC_NOVTABLE PluginUrlRequestDelegate { // NOLINT virtual void AddPrivacyDataForUrl(const std::string& url, const std::string& policy_ref, int32 flags) {} + virtual bool SendIPCMessage(IPC::Message* message) { + return false; + } protected: PluginUrlRequestDelegate() {} ~PluginUrlRequestDelegate() {} @@ -77,6 +80,16 @@ class DECLSPEC_NOVTABLE PluginUrlRequestManager { // NOLINT StopAll(); } + bool GetCookiesFromHost(int tab_handle, const GURL& url, + int cookie_id) { + return GetCookiesForUrl(tab_handle, url, cookie_id); + } + + bool SetCookiesInHost(int tab_handle, const GURL& url, + const std::string& cookie) { + return SetCookiesForUrl(tab_handle, url, cookie); + } + protected: PluginUrlRequestDelegate* delegate_; bool enable_frame_busting_; @@ -88,6 +101,19 @@ class DECLSPEC_NOVTABLE PluginUrlRequestManager { // NOLINT virtual void EndRequest(int request_id) = 0; virtual void DownloadRequestInHost(int request_id) = 0; virtual void StopAll() = 0; + + // The default handling for these functions which get and set cookies + // is to return false, which basically ensures that the default handling + // of processing the corresponding cookie IPCs occurs in the UI thread. + virtual bool GetCookiesForUrl(int tab_handle, const GURL& url, + int cookie_id) { + return false; + } + + virtual bool SetCookiesForUrl(int tab_handle, const GURL& url, + const std::string& cookie) { + return false; + } }; // Used as base class. Holds Url request properties (url, method, referrer..) |