From a22f7e069020486f1d93510b46b488b40dcb57c7 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Wed, 9 Feb 2011 07:15:35 +0000 Subject: Remove includes of message headers in headers. Review URL: http://codereview.chromium.org/6458004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74257 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/chrome_frame_activex.cc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'chrome_frame/chrome_frame_activex.cc') diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc index c7dcb40..d0add36 100644 --- a/chrome_frame/chrome_frame_activex.cc +++ b/chrome_frame/chrome_frame_activex.cc @@ -23,6 +23,7 @@ #include "base/utf_string_conversions.h" #include "base/win/scoped_bstr.h" #include "base/win/scoped_variant.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/automation/tab_proxy.h" @@ -115,6 +116,36 @@ HHOOK InstallLocalWindowHook(HWND window) { } // unnamed namespace +namespace chrome_frame { +std::string ActiveXCreateUrl(const GURL& parsed_url, + const AttachExternalTabParams& params) { + return base::StringPrintf( + "%hs?attach_external_tab&%I64u&%d&%d&%d&%d&%d&%hs", + parsed_url.GetOrigin().spec().c_str(), + params.cookie, + params.disposition, + params.dimensions.x(), + params.dimensions.y(), + params.dimensions.width(), + params.dimensions.height(), + params.profile_name.c_str()); +} + +int GetDisposition(const AttachExternalTabParams& params) { + return params.disposition; +} + +void GetMiniContextMenuData(UINT cmd, + const MiniContextMenuParams& params, + GURL* referrer, + GURL* url) { + *referrer = params.frame_url.is_empty() ? params.page_url : params.frame_url; + *url = (cmd == IDS_CONTENT_CONTEXT_SAVELINKAS ? + params.link_url : params.src_url); +} + +} // namespace chrome_frame + ChromeFrameActivex::ChromeFrameActivex() : chrome_wndproc_hook_(NULL) { TRACE_EVENT_BEGIN("chromeframe.createactivex", this, ""); -- cgit v1.1