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

Side by Side Diff: printing/pdf_render_settings.h

Issue 2477283002: Convert printing IPCs to Mojo
Patch Set: Fix more Windows compile errors Created 3 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PRINTING_PDF_RENDER_SETTINGS_H_ 5 #ifndef PRINTING_PDF_RENDER_SETTINGS_H_
6 #define PRINTING_PDF_RENDER_SETTINGS_H_ 6 #define PRINTING_PDF_RENDER_SETTINGS_H_
7 7
8 #include "ipc/ipc_message_utils.h" 8 #include "ipc/ipc_message_utils.h"
9 #include "ipc/ipc_param_traits.h" 9 #include "ipc/ipc_param_traits.h"
10 #include "printing/printing_export.h" 10 #include "printing/printing_export.h"
(...skipping 14 matching lines...) Expand all
25 int dpi; 25 int dpi;
26 bool autorotate; 26 bool autorotate;
27 }; 27 };
28 28
29 } // namespace printing 29 } // namespace printing
30 30
31 namespace IPC { 31 namespace IPC {
32 template <> 32 template <>
33 struct ParamTraits<printing::PdfRenderSettings> { 33 struct ParamTraits<printing::PdfRenderSettings> {
34 typedef printing::PdfRenderSettings param_type; 34 typedef printing::PdfRenderSettings param_type;
35
36 static void GetSize(base::PickleSizer* s, const param_type& p) {
37 GetParamSize(s, p.area);
38 GetParamSize(s, p.dpi);
39 GetParamSize(s, p.autorotate);
40 }
41
35 static void Write(base::Pickle* m, const param_type& p) { 42 static void Write(base::Pickle* m, const param_type& p) {
36 WriteParam(m, p.area); 43 WriteParam(m, p.area);
37 WriteParam(m, p.dpi); 44 WriteParam(m, p.dpi);
38 WriteParam(m, p.autorotate); 45 WriteParam(m, p.autorotate);
39 } 46 }
40 47
41 static bool Read(const base::Pickle* m, 48 static bool Read(const base::Pickle* m,
42 base::PickleIterator* iter, 49 base::PickleIterator* iter,
43 param_type* r) { 50 param_type* r) {
44 return ReadParam(m, iter, &r->area) && 51 return ReadParam(m, iter, &r->area) &&
45 ReadParam(m, iter, &r->dpi) && 52 ReadParam(m, iter, &r->dpi) &&
46 ReadParam(m, iter, &r->autorotate); 53 ReadParam(m, iter, &r->autorotate);
47 } 54 }
48 55
49 static void Log(const param_type& p, std::string* l) { 56 static void Log(const param_type& p, std::string* l) {
50 LogParam(p.area, l); 57 LogParam(p.area, l);
51 l->append(", "); 58 l->append(", ");
52 LogParam(p.dpi, l); 59 LogParam(p.dpi, l);
53 l->append(", "); 60 l->append(", ");
54 LogParam(p.autorotate, l); 61 LogParam(p.autorotate, l);
55 } 62 }
56 }; 63 };
57 64
58 } // namespace IPC 65 } // namespace IPC
59 66
60 #endif // PRINTING_PDF_RENDER_SETTINGS_H_ 67 #endif // PRINTING_PDF_RENDER_SETTINGS_H_
OLDNEW
« chrome/service/service_utility_process_host.cc ('K') | « printing/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698