diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-20 22:02:25 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-20 22:02:25 +0000 |
commit | 75280ad2f6013db0a504650801fa8134a707a49c (patch) | |
tree | 09812e68bfc5304b95372d6c59c0599a3e5d98cf /chrome/service/service_utility_process_host.h | |
parent | ed3eb462ba5584dabfa47461e676cb89da921838 (diff) | |
download | chromium_src-75280ad2f6013db0a504650801fa8134a707a49c.zip chromium_src-75280ad2f6013db0a504650801fa8134a707a49c.tar.gz chromium_src-75280ad2f6013db0a504650801fa8134a707a49c.tar.bz2 |
Printing on Windows via PDF
Currently:
- Based on #if, switches renderer rendering to PDF for preview
- Add PdfToEmfConvert based on PWGRasterConverter
- Various plumbing.
Preview works the same as other PDF based platforms. For getting
to EMF, the when PRINTING_WIN_USES_PDF_AS_METAFILE is on, the
renderer generates a PDF instead of EMF directly (this contains
all the pages in the desired range). This is returned to
PrintViewManagerBase, where it's passed to PdfToEmfConverter which
uses the sandboxed utility process and pdf.dll to convert via
RenderPDFPageToDC. The utility process renderers one emf page at
at time (into numbered files) to avoid having a very large emf file.
As this uses pdf.dll this is currently off-by-default controlled by
the gyp variable win_pdf_metafile_for_printing.
R=vitalybuka@chromium.org
BUG=170859
Review URL: https://codereview.chromium.org/255543006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271772 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/service_utility_process_host.h')
-rw-r--r-- | chrome/service/service_utility_process_host.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h index 855e2a7..ac37bdb 100644 --- a/chrome/service/service_utility_process_host.h +++ b/chrome/service/service_utility_process_host.h @@ -139,8 +139,9 @@ class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate { base::ProcessHandle handle() const { return handle_; } // Messages handlers: - void OnRenderPDFPagesToMetafileSucceeded(int highest_rendered_page_number, - double scale_factor); + void OnRenderPDFPagesToMetafilesSucceeded( + const std::vector<printing::PageRange>& page_ranges, + double scale_factor); void OnRenderPDFPagesToMetafileFailed(); void OnGetPrinterCapsAndDefaultsSucceeded( const std::string& printer_name, @@ -158,7 +159,7 @@ class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate { scoped_refptr<Client> client_; scoped_refptr<base::MessageLoopProxy> client_message_loop_proxy_; bool waiting_for_reply_; - // The path to the temp file where the metafile will be written to. + // The base path to the temp file where the metafile will be written to. base::FilePath metafile_path_; // The temporary folder created for the metafile. scoped_ptr<base::ScopedTempDir> scratch_metafile_dir_; |