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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PRINTING_PDF_RENDER_SETTINGS_H_
6 #define PRINTING_PDF_RENDER_SETTINGS_H_
7
8 #include "base/tuple.h"
9 #include "ipc/ipc_param_traits.h"
10 #include "printing/printing_export.h"
11 #include "ui/gfx/rect.h"
12
13 namespace printing {
14
15 // Defining PDF rendering settings here as a Tuple as following:
16 // gfx::Rect - render area
17 // int - render dpi
18 // bool - autorotate pages to fit paper
19 typedef Tuple3<gfx::Rect, int, bool> PdfRenderSettingsBase;
20
21 struct PdfRenderSettings : public PdfRenderSettingsBase {
22 public:
23 PdfRenderSettings() : PdfRenderSettingsBase() {}
24 PdfRenderSettings(gfx::Rect area, int dpi, bool autorotate)
25 : PdfRenderSettingsBase(area, dpi, autorotate) {}
26 ~PdfRenderSettings() {}
27
28 const gfx::Rect& area() const { return a; }
29 int dpi() const { return b; }
30 bool autorotate() const { return c; }
31 };
32
33 } // namespace printing
34
35 template <>
36 struct IPC::SimilarTypeTraits<printing::PdfRenderSettings> {
37 typedef printing::PdfRenderSettingsBase Type;
38 };
39
40 #endif // PRINTING_PDF_RENDER_SETTINGS_H_
41
OLDNEW
« 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