summaryrefslogtreecommitdiffstats
path: root/chrome_frame/utils.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 23:00:01 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 23:00:01 +0000
commit93b792798207296c98e08336e252288da9b7320f (patch)
tree43bfd0d9112e16cef6f1d76afdad1f602e624c6b /chrome_frame/utils.cc
parentd944adfc26c426db11dcb8a803b454040f6b0875 (diff)
downloadchromium_src-93b792798207296c98e08336e252288da9b7320f.zip
chromium_src-93b792798207296c98e08336e252288da9b7320f.tar.gz
chromium_src-93b792798207296c98e08336e252288da9b7320f.tar.bz2
Download requests initiated in a ChromeFrame popup window opened via window.open should be reissued
in the current navigation context. We use the attach external tab URL prefix as a cue to identify whether the navigation should be reissued in a new window. Fixes bug http://code.google.com/p/chromium/issues/detail?id=84235 BUG=84235 Review URL: http://codereview.chromium.org/7033061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.cc')
-rw-r--r--chrome_frame/utils.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index 69c4b31..c1f9fe5 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -792,7 +792,8 @@ RendererType RendererTypeForUrl(const std::wstring& url) {
HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
const wchar_t* headers, IBindCtx* bind_ctx,
- const wchar_t* fragment, IStream* post_data) {
+ const wchar_t* fragment, IStream* post_data,
+ VARIANT* flags) {
DCHECK(browser);
DCHECK(moniker);
DCHECK(bind_ctx);
@@ -806,13 +807,6 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
if (FAILED(hr))
return hr;
- // Always issue the download request in a new window to ensure that the
- // currently loaded ChromeFrame document does not inadvarently see an unload
- // request. This runs javascript unload handlers on the page which renders
- // the page non functional.
- VARIANT flags = { VT_I4 };
- V_I4(&flags) = navOpenInNewWindow | navNoHistory;
-
// If the data to be downloaded was received in response to a post request
// then we need to reissue the post request.
base::win::ScopedVariant post_data_variant;
@@ -893,14 +887,14 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
if (GetIEVersion() < IE_9) {
hr = browser_priv2->NavigateWithBindCtx2(
- uri_obj, &flags, NULL, post_data_variant.AsInput(),
+ uri_obj, flags, NULL, post_data_variant.AsInput(),
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, &flags, NULL, post_data_variant.AsInput(),
+ uri_obj, flags, NULL, post_data_variant.AsInput(),
headers_var.AsInput(), bind_ctx,
const_cast<wchar_t*>(fragment), 0);
}
@@ -930,7 +924,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
}
base::win::ScopedVariant var_url(UTF8ToWide(target_url.spec()).c_str());
- hr = browser_priv->NavigateWithBindCtx(var_url.AsInput(), &flags, NULL,
+ hr = browser_priv->NavigateWithBindCtx(var_url.AsInput(), flags, NULL,
post_data_variant.AsInput(),
headers_var.AsInput(), bind_ctx,
const_cast<wchar_t*>(fragment));