1 // Copyright (c) 2012 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.
5 #include "base/basictypes.h"
6 #include "base/strings/string16.h"
7 #include "ui/gfx/geometry/size.h"
9 #define IPC_MESSAGE_IMPL
10 #include "components/printing/common/print_messages.h"
12 // Generate constructors.
13 #include "ipc/struct_constructor_macros.h"
14 #include "components/printing/common/print_messages.h"
16 // Generate destructors.
17 #include "ipc/struct_destructor_macros.h"
18 #include "components/printing/common/print_messages.h"
20 // Generate param traits write methods.
21 #include "ipc/param_traits_write_macros.h"
23 #include "components/printing/common/print_messages.h"
26 // Generate param traits read methods.
27 #include "ipc/param_traits_read_macros.h"
29 #include "components/printing/common/print_messages.h"
32 // Generate param traits log methods.
33 #include "ipc/param_traits_log_macros.h"
35 #include "components/printing/common/print_messages.h"
38 PrintMsg_Print_Params::PrintMsg_Print_Params()
49 selection_only(false),
50 supports_alpha_blend(false),
52 preview_request_id(0),
53 is_first_request(false),
54 print_scaling_option(blink::WebPrintScalingOptionSourceSize
),
56 display_header_footer(false),
59 should_print_backgrounds(false) {
62 PrintMsg_Print_Params::~PrintMsg_Print_Params() {}
64 void PrintMsg_Print_Params::Reset() {
65 page_size
= gfx::Size();
66 content_size
= gfx::Size();
67 printable_area
= gfx::Rect();
75 selection_only
= false;
76 supports_alpha_blend
= false;
78 preview_request_id
= 0;
79 is_first_request
= false;
80 print_scaling_option
= blink::WebPrintScalingOptionSourceSize
;
82 display_header_footer
= false;
83 title
= base::string16();
84 url
= base::string16();
85 should_print_backgrounds
= false;
88 PrintMsg_PrintPages_Params::PrintMsg_PrintPages_Params()
92 PrintMsg_PrintPages_Params::~PrintMsg_PrintPages_Params() {}
94 void PrintMsg_PrintPages_Params::Reset() {
96 pages
= std::vector
<int>();
99 PrintHostMsg_RequestPrintPreview_Params::
100 PrintHostMsg_RequestPrintPreview_Params()
101 : is_modifiable(false),
103 has_selection(false),
104 selection_only(false) {
107 PrintHostMsg_RequestPrintPreview_Params::
108 ~PrintHostMsg_RequestPrintPreview_Params() {}
110 PrintHostMsg_SetOptionsFromDocument_Params::
111 PrintHostMsg_SetOptionsFromDocument_Params()
112 : is_scaling_disabled(false),
114 duplex(printing::UNKNOWN_DUPLEX_MODE
) {
117 PrintHostMsg_SetOptionsFromDocument_Params::
118 ~PrintHostMsg_SetOptionsFromDocument_Params() {