Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9634)

Unified Diff: chrome/common/chrome_utility_printing_messages.h

Issue 566693002: Use file handles to interact with utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Sep 17 10:40:51 PDT 2014 Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/service/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_utility_printing_messages.h
diff --git a/chrome/common/chrome_utility_printing_messages.h b/chrome/common/chrome_utility_printing_messages.h
index d0a964d895685c85bda68661e1ed197109e27d53..d5ddd6e142627567380248e302eafba80428311e 100644
--- a/chrome/common/chrome_utility_printing_messages.h
+++ b/chrome/common/chrome_utility_printing_messages.h
@@ -61,6 +61,23 @@ IPC_STRUCT_TRAITS_END()
// Utility process messages:
// These are messages from the browser to the utility process.
+#if defined(OS_WIN)
+// Tell the utility process to start rendering the given PDF into a metafile.
+// Utility process would be alive until
+// ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop message.
+IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
+ IPC::PlatformFileForTransit, /* input_file */
+ printing::PdfRenderSettings /* settings */)
+
+// Requests conversion of the next page.
+IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RenderPDFPagesToMetafiles_GetPage,
+ int /* page_number */,
+ IPC::PlatformFileForTransit /* output_file */)
+
+// Requests utility process to stop conversion and exit.
+IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_RenderPDFPagesToMetafiles_Stop)
+#endif // OS_WIN
+
// Tell the utility process to render the given PDF into a PWGRaster.
IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToPWGRaster,
IPC::PlatformFileForTransit, /* Input PDF file */
@@ -87,6 +104,18 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterSemanticCapsAndDefaults,
// Utility process host messages:
// These are messages from the utility process to the browser.
+#if defined(OS_WIN)
+// Reply when the utility process loaded PDF. |page_count| is 0, if loading
+// failed.
+IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageCount,
+ int /* page_count */)
+
+// Reply when the utility process rendered the PDF page.
+IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_PageDone,
+ bool /* success */,
+ double /* scale_factor */)
+#endif // OS_WIN
+
// Reply when the utility process has succeeded in rendering the PDF to PWG.
IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Succeeded)
@@ -118,23 +147,3 @@ IPC_MESSAGE_CONTROL1(
std::string /* printer name */)
#endif // ENABLE_FULL_PRINTING
-
-#if defined(OS_WIN)
-// Tell the utility process to render the given PDF into a metafile.
-// The metafile path will have ".%d" inserted where the %d is the page number.
-// If no page range is specified, all pages will be converted.
-IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_RenderPDFPagesToMetafiles,
- IPC::PlatformFileForTransit, // PDF file
- base::FilePath, // Base location for output metafile
- printing::PdfRenderSettings, // PDF render settings
- std::vector<printing::PageRange>)
-
-// Reply when the utility process has succeeded in rendering the PDF.
-IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_RenderPDFPagesToMetafiles_Succeeded,
- std::vector<printing::PageRange>, // Pages rendered
- double) // Scale factor
-
-// Reply when an error occurred rendering the PDF.
-IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToMetafile_Failed)
-
-#endif // OS_WIN
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698