diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 01:19:04 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-17 01:19:04 +0000 |
commit | e3a91e7d2cb359692c59b86a29453f1931f87760 (patch) | |
tree | 83d18e33d0041e888e580dee0e81b15cf3d490fc /chrome_frame/utils.h | |
parent | 584245e578427abc2bc19f224609f820ad71aca0 (diff) | |
download | chromium_src-e3a91e7d2cb359692c59b86a29453f1931f87760.zip chromium_src-e3a91e7d2cb359692c59b86a29453f1931f87760.tar.gz chromium_src-e3a91e7d2cb359692c59b86a29453f1931f87760.tar.bz2 |
window.open calls issued by pages within ChromeFrame would not honor the suggested dimensions and would end up
opening a default top level browser window in IE.
ChromeFrame does receive the dimensions from the external tab container when it is notified about a popup being
opened.
Fix is to honor these dimensions by passing them off in the specially crafted url containing other arguments.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=42250
This fix is currently implemented for IE full tab mode only.
Bug=42250
Test=Covered by augmenting the existing window open test to also validate the window size. Added a new unit test
to test the ParseAttachExternalTabUrl helper function.
Review URL: http://codereview.chromium.org/2867007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.h')
-rw-r--r-- | chrome_frame/utils.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h index 5f25e00..11b050d 100644 --- a/chrome_frame/utils.h +++ b/chrome_frame/utils.h @@ -18,7 +18,7 @@ #include "base/lock.h" #include "base/logging.h" #include "base/thread.h" - +#include "gfx/rect.h" #include "googleurl/src/gurl.h" // utils.h : Various utility functions and classes @@ -464,4 +464,13 @@ std::string Bscf2Str(DWORD flags); // Reads data from a stream into a string. HRESULT ReadStream(IStream* stream, size_t size, std::string* data); +// Parses the attach external tab url, which comes in from Chrome in the course +// of a window.open operation. The format of this URL is as below:- +// gcf:attach_external_tab&n1&n2&x&y&width&height +// n1 -> cookie, n2 -> disposition, x, y, width, height -> dimensions of the +// window. +// Returns true on success. +bool ParseAttachExternalTabUrl(const std::wstring& url, uint64* cookie, + gfx::Rect* dimensions, int* disposition); + #endif // CHROME_FRAME_UTILS_H_ |