From 38bba4f8e2f93dd789c3483a3f0c153ca5809793 Mon Sep 17 00:00:00 2001 From: "sanjeevr@chromium.org" Date: Fri, 12 Mar 2010 05:29:07 +0000 Subject: Changes made to the printing logic to allow plugins to participate in the browser's print workflow. These changes mainly involve allowing the plugin to specify whether it wants the browser to use overlays and also changes to the EMF code on Windows to decompress JPEGs/PNGs in the metafile. The related webkit change is https://bugs.webkit.org/show_bug.cgi?id=35550 BUG=None TEST=Test printing with new Pepper plugins that support custom printing. Review URL: http://codereview.chromium.org/745001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41400 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/print_web_view_helper.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'chrome/renderer/print_web_view_helper.cc') diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index 32e4064..52aede1 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -29,7 +29,8 @@ PrepareFrameAndViewForPrint::PrepareFrameAndViewForPrint( const ViewMsg_Print_Params& print_params, WebFrame* frame, WebView* web_view) - : frame_(frame), web_view_(web_view), expected_pages_count_(0) { + : frame_(frame), web_view_(web_view), expected_pages_count_(0), + use_browser_overlays_(true) { print_canvas_size_.set_width( printing::ConvertUnit(print_params.printable_size.width(), static_cast(print_params.dpi), @@ -53,7 +54,9 @@ PrepareFrameAndViewForPrint::PrepareFrameAndViewForPrint( web_view->resize(print_layout_size); - expected_pages_count_ = frame->printBegin(print_canvas_size_); + expected_pages_count_ = frame->printBegin( + print_canvas_size_, static_cast(print_params.dpi), + &use_browser_overlays_); } PrepareFrameAndViewForPrint::~PrepareFrameAndViewForPrint() { -- cgit v1.1