diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-15 01:40:20 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-15 01:40:20 +0000 |
commit | 7694e6e99cdc9dd9fd30b0371714963c54e0b614 (patch) | |
tree | fc07b7d8eb7b4092be43fa8b4b340228e2d72fa4 /chrome_frame | |
parent | 083f4cfee80e8e172875e2ca8666815b638d6d84 (diff) | |
download | chromium_src-7694e6e99cdc9dd9fd30b0371714963c54e0b614.zip chromium_src-7694e6e99cdc9dd9fd30b0371714963c54e0b614.tar.gz chromium_src-7694e6e99cdc9dd9fd30b0371714963c54e0b614.tar.bz2 |
Fix for the ChromeFrame DownloadFromForm test failures on the IE9 builder. This test
causes the latest IE9 developer preview version to crash. Reason being a change in the
interface implementing the NavigateWithBindCtx2 method.
BUG=none
TEST=Covered by existing DownloadFromForm test.
TBR=amit
Review URL: http://codereview.chromium.org/6253003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/extra_system_apis.h | 10 | ||||
-rw-r--r-- | chrome_frame/utils.cc | 14 |
2 files changed, 21 insertions, 3 deletions
diff --git a/chrome_frame/extra_system_apis.h b/chrome_frame/extra_system_apis.h index 6a53bd6..2573734 100644 --- a/chrome_frame/extra_system_apis.h +++ b/chrome_frame/extra_system_apis.h @@ -60,6 +60,16 @@ class IWebBrowserPriv2Common : public IUnknown { LPOLESTR url_fragment); }; +// The IWebBrowserPriv2Common interface flavor for IE9 preview 2 +// (9.0.8073.6003) +class IWebBrowserPriv2CommonIE9 : public IUnknown { + public: + STDMETHOD(NavigateWithBindCtx2)(IUri* uri, VARIANT* flags, + VARIANT* target_frame, VARIANT* post_data, + VARIANT* headers, IBindCtx* bind_ctx, + LPOLESTR url_fragment, DWORD unused1); +}; + // This interface is used to call FireBeforeNavigate with additional // information like url. Available on IE7 onwards. // diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index eb6abce..c23080c 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -847,9 +847,17 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker, uri_container->GetIUri(uri_obj.Receive()); DCHECK(uri_obj); - hr = browser_priv2->NavigateWithBindCtx2(uri_obj, NULL, NULL, NULL, - headers_var.AsInput(), bind_ctx, - const_cast<wchar_t*>(fragment)); + if (GetIEVersion() < IE_9) { + hr = browser_priv2->NavigateWithBindCtx2( + uri_obj, NULL, NULL, NULL, headers_var.AsInput(), bind_ctx, + const_cast<wchar_t*>(fragment)); + } else { + IWebBrowserPriv2CommonIE9* browser_priv2_ie9 = + reinterpret_cast<IWebBrowserPriv2CommonIE9*>(browser_priv2.get()); + hr = browser_priv2_ie9->NavigateWithBindCtx2( + uri_obj, NULL, NULL, NULL, headers_var.AsInput(), bind_ctx, + const_cast<wchar_t*>(fragment), 0); + } DLOG_IF(WARNING, FAILED(hr)) << base::StringPrintf(L"NavigateWithBindCtx2 0x%08X", hr); } |