summaryrefslogtreecommitdiffstats
path: root/chrome_frame/urlmon_moniker.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 21:32:19 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 21:32:19 +0000
commit3eb8a7049a1678c35845c10e95ecc4bf303b59e2 (patch)
treeac63296aaca85259b015036af4d34acccbb62ea1 /chrome_frame/urlmon_moniker.h
parent2d8099cf56475b6989911ea8e573cbeb26724f3d (diff)
downloadchromium_src-3eb8a7049a1678c35845c10e95ecc4bf303b59e2.zip
chromium_src-3eb8a7049a1678c35845c10e95ecc4bf303b59e2.tar.gz
chromium_src-3eb8a7049a1678c35845c10e95ecc4bf303b59e2.tar.bz2
Refreshing a ChromeFrame page which was received in response to a top level POST to a page
in IE should reissue the POST request after bringing up a confirmation dialog. This CL adds support to ChromeFrame to achieve this. Ideally we would want IE to display the confirmation dialog for the POST. However the doc object host which is implemented by IEFrame expects the doc object to implement the IHTMLDocument interface and a bunch of private interfaces. To reissue the POST request we save away the POST data and headers in the navigation manager instance which is per BHO. When we refresh the page in ChromeFrame the active document on seeing that we have posted data issues a navigation back to the URL with the posted data and saved headers. All other refreshes continue to work the same way as before, i.e. the refresh request is sent to Chrome on the automation channel. The confirmation dialog is put up by the active document with the same text and caption as that in Chrome. Fixes bug http://code.google.com/p/chromium/issues/detail?id=64901 BUG=64901 TEST=Covered by new ChromeFrame unit test Review URL: http://codereview.chromium.org/5595002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68213 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_moniker.h')
-rw-r--r--chrome_frame/urlmon_moniker.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome_frame/urlmon_moniker.h b/chrome_frame/urlmon_moniker.h
index a5b7fdf..dde70adb 100644
--- a/chrome_frame/urlmon_moniker.h
+++ b/chrome_frame/urlmon_moniker.h
@@ -13,6 +13,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/thread_local.h"
+#include "base/win/scoped_variant.h"
#include "googleurl/src/gurl.h"
#include "chrome_frame/utils.h"
@@ -122,9 +123,38 @@ class NavigationManager {
// and need to switch over from mshtml to CF.
virtual HRESULT NavigateToCurrentUrlInCF(IBrowserService* browser);
+ void set_post_data(VARIANT* post_data) {
+ post_data_.Reset();
+ if (post_data) {
+ if (V_VT(post_data) == (VT_BYREF | VT_VARIANT)) {
+ post_data_.Set(*post_data->pvarVal);
+ } else {
+ NOTREACHED() << "unexpected type for post_data: "
+ << std::hex << post_data->vt;
+ }
+ }
+ }
+
+ const base::win::ScopedVariant& post_data() const {
+ return post_data_;
+ }
+
+ void set_headers(VARIANT* headers) {
+ headers_.Reset();
+ if (headers) {
+ headers_ = *headers;
+ }
+ }
+
+ const base::win::ScopedVariant& headers() const {
+ return headers_;
+ }
+
protected:
std::string referrer_;
std::wstring url_;
+ base::win::ScopedVariant post_data_;
+ base::win::ScopedVariant headers_;
static base::LazyInstance<base::ThreadLocalPointer<NavigationManager> >
thread_singleton_;