diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 00:15:43 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 00:15:43 +0000 |
commit | 130954003bdd03f9c3ae563a2ed67466528e71c5 (patch) | |
tree | c59200233fd6fdaeec0c6279efa5fdba2493f402 /chrome/common/utility_messages_internal.h | |
parent | 8a871374acb440a7d35a7b6c10840c7a2f712b65 (diff) | |
download | chromium_src-130954003bdd03f9c3ae563a2ed67466528e71c5.zip chromium_src-130954003bdd03f9c3ae563a2ed67466528e71c5.tar.gz chromium_src-130954003bdd03f9c3ae563a2ed67466528e71c5.tar.bz2 |
Created a host for running the utility process as a child of the service process. This is used for rendering PDFs to a metafile in a sandbox for the Cloud Print proxy on Windows.
BUG=None
TEST=Test Windows Cloud Print proxy
Review URL: http://codereview.chromium.org/2917013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/utility_messages_internal.h')
-rw-r--r-- | chrome/common/utility_messages_internal.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/common/utility_messages_internal.h b/chrome/common/utility_messages_internal.h index 5c3f971..9231501 100644 --- a/chrome/common/utility_messages_internal.h +++ b/chrome/common/utility_messages_internal.h @@ -13,6 +13,10 @@ // from it via utility_messages.h. #include "ipc/ipc_message_macros.h" +#include "base/platform_file.h" +#include "gfx/rect.h" +#include "printing/native_metafile.h" +#include "printing/page_range.h" #include "third_party/skia/include/core/SkBitmap.h" //------------------------------------------------------------------------------ @@ -37,6 +41,13 @@ IPC_BEGIN_MESSAGES(Utility) // Tell the utility process to decode the given image data. IPC_MESSAGE_CONTROL1(UtilityMsg_DecodeImage, std::vector<unsigned char>) // encoded image contents + + // Tell the utility process to render the given PDF into a metafile. + IPC_MESSAGE_CONTROL4(UtilityMsg_RenderPDFPagesToMetafile, + base::PlatformFile, // PDF file + gfx::Rect, // Render Area + int, // DPI + std::vector<printing::PageRange>) IPC_END_MESSAGES(Utility) //------------------------------------------------------------------------------ @@ -84,4 +95,20 @@ IPC_BEGIN_MESSAGES(UtilityHost) // Reply when an error occured decoding the image. IPC_MESSAGE_CONTROL0(UtilityHostMsg_DecodeImage_Failed) + + // Reply when the utility process has succeeded in rendering the PDF. + IPC_MESSAGE_CONTROL2(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded, + printing::NativeMetafile, // Output metafile + int) // Highest rendered page number + + // Reply when an error occured rendering the PDF. + IPC_MESSAGE_CONTROL0(UtilityHostMsg_RenderPDFPagesToMetafile_Failed) + +#if defined(OS_WIN) + // Request that the given font be loaded by the host so it's cached by the + // OS. Please see ChildProcessHost::PreCacheFont for details. + IPC_SYNC_MESSAGE_CONTROL1_0(UtilityHostMsg_PreCacheFont, + LOGFONT /* font data */) +#endif // defined(OS_WIN) + IPC_END_MESSAGES(UtilityHost) |