summaryrefslogtreecommitdiffstats
path: root/chrome_frame/utils.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 00:02:34 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 00:02:34 +0000
commit7e3544bd5859cad57261bc4827686f266a8d3961 (patch)
treee3859f5a3692cf096ba92f02636b46ccd24e2f08 /chrome_frame/utils.h
parent52574021ab8190a5b93bdf1344dada2b420f4b1c (diff)
downloadchromium_src-7e3544bd5859cad57261bc4827686f266a8d3961.zip
chromium_src-7e3544bd5859cad57261bc4827686f266a8d3961.tar.gz
chromium_src-7e3544bd5859cad57261bc4827686f266a8d3961.tar.bz2
If we navigate to a URL which has an anchor in IE, which eventually ends up in ChromeFrame,
the actual URL queried from the moniker passed in to our implementation of IPersistStream::Load does not have the anchor. It looks like there are some private interfaces exposed by MSHTML and invoked by IEFrame to pass this information over. Our fix is to save away the url received in our Bho BeforeNavigate2 notification and use this URL if available before querying the moniker for the URL. This needs to be done in IPersistStream::Load and in the OnHttpEquiv patch when we initiate a navigation to the actual URL using the moniker. Fixes bug http://code.google.com/p/chromium/issues/detail?id=27270 Bug=27270 Test=Covered by unit test. Review URL: http://codereview.chromium.org/542096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36814 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 8048beb..f42062c 100644
--- a/chrome_frame/utils.h
+++ b/chrome_frame/utils.h
@@ -225,7 +225,8 @@ HRESULT GetUrlFromMoniker(IMoniker* moniker, IBindCtx* bind_context,
// Navigates an IWebBrowser2 object to a moniker.
// |headers| can be NULL.
HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
- const wchar_t* headers, IBindCtx* bind_ctx);
+ const wchar_t* headers, IBindCtx* bind_ctx,
+ const wchar_t* fragment);
// Raises a flag on the current thread (using TLS) to indicate that an
// in-progress navigation should be rendered in chrome frame.
@@ -314,4 +315,13 @@ STDMETHODIMP QueryInterfaceIfDelegateSupports(void* obj, REFIID iid,
extern const wchar_t kChromeFrameHeadlessMode[];
+// The urls retrieved from the IMoniker interface don't contain the anchor
+// portion of the actual url navigated to. This function checks whether the
+// url passed in the bho_url parameter contains an anchor and if yes checks
+// whether it matches the url retrieved from the moniker. If yes it returns
+// the bho url, if not the moniker url.
+std::wstring GetActualUrlFromMoniker(IMoniker* moniker,
+ IBindCtx* bind_context,
+ const std::wstring& bho_url);
+
#endif // CHROME_FRAME_UTILS_H_