summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/extra_system_apis.h10
-rw-r--r--chrome_frame/utils.cc14
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);
}