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

Unified Diff: chrome/service/cloud_print/print_system_win.cc

Issue 8146004: Added autorotate flag in PDF rendering and wiring it through service-utility channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/common/chrome_utility_messages.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/print_system_win.cc
===================================================================
--- chrome/service/cloud_print/print_system_win.cc (revision 104038)
+++ chrome/service/cloud_print/print_system_win.cc (working copy)
@@ -24,6 +24,7 @@
#include "printing/backend/win_helper.h"
#include "printing/emf_win.h"
#include "printing/page_range.h"
+#include "printing/pdf_render_settings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/rect.h"
@@ -548,10 +549,15 @@
BelongsToCurrentThread());
scoped_ptr<ServiceUtilityProcessHost> utility_host(
new ServiceUtilityProcessHost(this, client_message_loop_proxy));
- if (utility_host->StartRenderPDFPagesToMetafile(pdf_path,
- render_area,
- render_dpi,
- page_ranges)) {
+ // TODO(gene): For now we disabling autorotation for CloudPrinting.
+ // Landscape/Portrait setting is passed in the print ticket and
+ // server is generating portrait PDF always.
+ // We should enable autorotation once server will be able to generate
+ // PDF that matches paper size and orientation.
+ if (utility_host->StartRenderPDFPagesToMetafile(
+ pdf_path,
+ printing::PdfRenderSettings(render_area, render_dpi, false),
+ page_ranges)) {
// The object will self-destruct when the child process dies.
utility_host.release();
}
« no previous file with comments | « chrome/common/chrome_utility_messages.h ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698