Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / components / printing / common / print_messages.cc
blob8853502d4ba091c51d057bffcd012c238ccaf8a6
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"
22 namespace IPC {
23 #include "components/printing/common/print_messages.h"
24 } // namespace IPC
26 // Generate param traits read methods.
27 #include "ipc/param_traits_read_macros.h"
28 namespace IPC {
29 #include "components/printing/common/print_messages.h"
30 } // namespace IPC
32 // Generate param traits log methods.
33 #include "ipc/param_traits_log_macros.h"
34 namespace IPC {
35 #include "components/printing/common/print_messages.h"
36 } // namespace IPC
38 PrintMsg_Print_Params::PrintMsg_Print_Params()
39 : page_size(),
40 content_size(),
41 printable_area(),
42 margin_top(0),
43 margin_left(0),
44 dpi(0),
45 min_shrink(0),
46 max_shrink(0),
47 desired_dpi(0),
48 document_cookie(0),
49 selection_only(false),
50 supports_alpha_blend(false),
51 preview_ui_id(-1),
52 preview_request_id(0),
53 is_first_request(false),
54 print_scaling_option(blink::WebPrintScalingOptionSourceSize),
55 print_to_pdf(false),
56 display_header_footer(false),
57 title(),
58 url(),
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();
68 margin_top = 0;
69 margin_left = 0;
70 dpi = 0;
71 min_shrink = 0;
72 max_shrink = 0;
73 desired_dpi = 0;
74 document_cookie = 0;
75 selection_only = false;
76 supports_alpha_blend = false;
77 preview_ui_id = -1;
78 preview_request_id = 0;
79 is_first_request = false;
80 print_scaling_option = blink::WebPrintScalingOptionSourceSize;
81 print_to_pdf = false;
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()
89 : pages() {
92 PrintMsg_PrintPages_Params::~PrintMsg_PrintPages_Params() {}
94 void PrintMsg_PrintPages_Params::Reset() {
95 params.Reset();
96 pages = std::vector<int>();
99 PrintHostMsg_RequestPrintPreview_Params::
100 PrintHostMsg_RequestPrintPreview_Params()
101 : is_modifiable(false),
102 webnode_only(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),
113 copies(0),
114 duplex(printing::UNKNOWN_DUPLEX_MODE) {
117 PrintHostMsg_SetOptionsFromDocument_Params::
118 ~PrintHostMsg_SetOptionsFromDocument_Params() {