Refactor win printing workflow to support print preview.
Made code changes to create a single metafile for the entire printing document. Implemented the following function: 1. CreatePreviewDocument(): Create a single metafile and render all the pages(entire printing document) into the same metafile. Note: Although the structure of PrintPage() function looks similar to CreatePreviewDocument(), merging of these functions is difficult for the following reasons: 1. As of now, we are using EMF metafile to create a preview document. In future we are going to use Skia->PDF metafile. So construction and destruction of the metafile will be different. 2. The message for preview workflow(ViewHostMsg_PagesReadyForPreview) is different from normal printing workflow(ViewHostMsg_DidPrintPage). 3. The param struct which is sent along with the message for preview workflow is different from printing workflow. 4. Finally, the semantics of PrintPage() function is to print a page per metafile which is completely different from the semantics of CreatePreviewDocument() function. Once Skia->Pdf work is completed, Modify CreatePreviewDocument() function to use this PDF metafile. BUG=64121 TEST=printing works after code changes. Review URL: http://codereview.chromium.org/6261025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72804 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment