diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 21:15:15 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 21:15:15 +0000 |
commit | c4e45b3be08a8cefa237b25096f8a18fb5a5051d (patch) | |
tree | c6cb1e682bfde672b293406f8c6ea508694f3979 /chrome_frame/chrome_frame_activex_base.h | |
parent | 437d1c7f6cf70dbdc3d008745d974714db7dd68a (diff) | |
download | chromium_src-c4e45b3be08a8cefa237b25096f8a18fb5a5051d.zip chromium_src-c4e45b3be08a8cefa237b25096f8a18fb5a5051d.tar.gz chromium_src-c4e45b3be08a8cefa237b25096f8a18fb5a5051d.tar.bz2 |
Ensure that window.open requests issued by ChromeFrame carry the correct cookies in the outgoing HTTP requests.
To achieve this we no longer issue navigations with the gcf:attach* prefix. We now issue a navigation to the current
page URL with the attach external tab suffix, which indicates that the page is forced into ChromeFrame without making
an actual HTTP request. This ensures that the new IE8 process has access to all HTTP cookies.
We need to patch IInternetProtocol::LockRequest and UnlockRequest to not call the underlying implementations for our
dummy request as this crashes in IE8 in the prebinding code path.
Fixes bug http://b/issue?id=2277519
Added tests for the CanNavigateFullTabMode helper function.
Bug=2277519
Review URL: http://codereview.chromium.org/3051018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h index be8553a..50029b7 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -480,15 +480,19 @@ END_MSG_MAP() virtual void OnAttachExternalTab(int tab_handle, const IPC::AttachExternalTabParams& params) { - std::string url; - url = StringPrintf("%lsattach_external_tab&%ls&%d&%d&%d&%d&%d", - kChromeProtocolPrefix, - Uint64ToWString(params.cookie).c_str(), - params.disposition, - params.dimensions.x(), - params.dimensions.y(), - params.dimensions.width(), - params.dimensions.height()); + std::wstring wide_url = url_; + GURL parsed_url(WideToUTF8(wide_url)); + + std::string url = + StringPrintf("%hs:%hs?attach_external_tab&%I64u&%d&%d&%d&%d&%d", + parsed_url.scheme().c_str(), + parsed_url.host().c_str(), + params.cookie, + params.disposition, + params.dimensions.x(), + params.dimensions.y(), + params.dimensions.width(), + params.dimensions.height()); HostNavigate(GURL(url), GURL(), params.disposition); } |