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

Unified Diff: printing/pdf_render_settings.h

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/utility/chrome_content_utility_client.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_render_settings.h
===================================================================
--- printing/pdf_render_settings.h (revision 0)
+++ printing/pdf_render_settings.h (revision 0)
@@ -0,0 +1,41 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PRINTING_PDF_RENDER_SETTINGS_H_
+#define PRINTING_PDF_RENDER_SETTINGS_H_
+
+#include "base/tuple.h"
+#include "ipc/ipc_param_traits.h"
+#include "printing/printing_export.h"
+#include "ui/gfx/rect.h"
+
+namespace printing {
+
+// Defining PDF rendering settings here as a Tuple as following:
+// gfx::Rect - render area
+// int - render dpi
+// bool - autorotate pages to fit paper
+typedef Tuple3<gfx::Rect, int, bool> PdfRenderSettingsBase;
+
+struct PdfRenderSettings : public PdfRenderSettingsBase {
+ public:
+ PdfRenderSettings() : PdfRenderSettingsBase() {}
+ PdfRenderSettings(gfx::Rect area, int dpi, bool autorotate)
+ : PdfRenderSettingsBase(area, dpi, autorotate) {}
+ ~PdfRenderSettings() {}
+
+ const gfx::Rect& area() const { return a; }
+ int dpi() const { return b; }
+ bool autorotate() const { return c; }
+};
+
+} // namespace printing
+
+template <>
+struct IPC::SimilarTypeTraits<printing::PdfRenderSettings> {
+ typedef printing::PdfRenderSettingsBase Type;
+};
+
+#endif // PRINTING_PDF_RENDER_SETTINGS_H_
+
« no previous file with comments | « chrome/utility/chrome_content_utility_client.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698