summaryrefslogtreecommitdiffstats
path: root/chrome_frame/utils.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-28 22:18:33 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-28 22:18:33 +0000
commitf4fbae68a3fbdea8d14af164ddaa5986b4eefd6c (patch)
treef89c5ee0329d5ab17ad0281ff45589f4cb1e3940 /chrome_frame/utils.h
parent1d9104aa2450fd4dd21cfb2e1a73ddc0e0613f50 (diff)
downloadchromium_src-f4fbae68a3fbdea8d14af164ddaa5986b4eefd6c.zip
chromium_src-f4fbae68a3fbdea8d14af164ddaa5986b4eefd6c.tar.gz
chromium_src-f4fbae68a3fbdea8d14af164ddaa5986b4eefd6c.tar.bz2
Download requests in ChromeFrame which occur in response to a POST request need to pass
the post data as well while reissuing the navigation. This ensures that a POST request is correctly sent out at all times instead of a GET request. While the assumption is that reusing the bind context would achieve this behavior, it does not appear to be true at all times. While fixing this I also found that reissuing a navigation via a NavigateWithBindCtx call causes the current chrome frame document to receive an Unload call at times, leading to the page being rendered useless after the request finishes. We should reissue the navigation on a new window to work around this problem. Fixes bug http://code.google.com/p/chromium/issues/detail?id=73985 BUG=73985 TEST=As described in the bug. Review URL: http://codereview.chromium.org/6598016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.h')
-rw-r--r--chrome_frame/utils.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h
index 47f0929..c2d6ef9 100644
--- a/chrome_frame/utils.h
+++ b/chrome_frame/utils.h
@@ -6,6 +6,7 @@
#define CHROME_FRAME_UTILS_H_
#include <OAidl.h>
+#include <objidl.h>
#include <windows.h>
#include <wininet.h>
#include <string>
@@ -302,7 +303,7 @@ HRESULT DoQueryService(const IID& service_id, IUnknown* unk, T** service) {
// |headers| can be NULL.
HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
const wchar_t* headers, IBindCtx* bind_ctx,
- const wchar_t* fragment);
+ const wchar_t* fragment, IStream* post_data);
// Raises a flag on the current thread (using TLS) to indicate that an
// in-progress navigation should be rendered in chrome frame.
@@ -457,6 +458,15 @@ extern base::Lock g_ChromeFrameHistogramLock;
// start asynchronous operations in order to not block the sender unnecessarily.
#define WM_DOWNLOAD_IN_HOST (WM_APP + 2)
+// This structure contains the parameters sent over to initiate a download
+// request in the host browser.
+struct DownloadInHostParams {
+ IBindCtx* bind_ctx;
+ IMoniker* moniker;
+ IStream* post_data;
+ std::string request_headers;
+};
+
// Maps the InternetCookieState enum to the corresponding CookieAction values
// used for IE privacy stuff.
int32 MapCookieStateToCookieAction(InternetCookieState cookie_state);