OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/common/print_messages.h" | 5 #include "chrome/common/print_messages.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "ui/gfx/size.h" | 9 #include "ui/gfx/size.h" |
10 | 10 |
11 PrintMsg_Print_Params::PrintMsg_Print_Params() | 11 PrintMsg_Print_Params::PrintMsg_Print_Params() |
12 : page_size(), | 12 : page_size(), |
13 content_size(), | 13 content_size(), |
14 printable_area(), | 14 printable_area(), |
15 margin_top(0), | 15 margin_top(0), |
16 margin_left(0), | 16 margin_left(0), |
17 dpi(0), | 17 dpi(0), |
18 min_shrink(0), | 18 min_shrink(0), |
19 max_shrink(0), | 19 max_shrink(0), |
20 desired_dpi(0), | 20 desired_dpi(0), |
21 document_cookie(0), | 21 document_cookie(0), |
22 selection_only(false), | 22 selection_only(false), |
23 supports_alpha_blend(false), | 23 supports_alpha_blend(false), |
24 preview_ui_id(-1), | 24 preview_ui_id(-1), |
25 preview_request_id(0), | 25 preview_request_id(0), |
26 is_first_request(false), | 26 is_first_request(false), |
27 print_scaling_option(WebKit::WebPrintScalingOptionSourceSize), | 27 print_scaling_option(WebKit::WebPrintScalingOptionSourceSize), |
28 print_to_pdf(false), | 28 print_to_pdf(false), |
29 display_header_footer(false), | 29 display_header_footer(false), |
30 date(), | |
31 title(), | 30 title(), |
32 url(), | 31 url(), |
33 should_print_backgrounds(false) { | 32 should_print_backgrounds(false) { |
34 } | 33 } |
35 | 34 |
36 PrintMsg_Print_Params::~PrintMsg_Print_Params() {} | 35 PrintMsg_Print_Params::~PrintMsg_Print_Params() {} |
37 | 36 |
38 void PrintMsg_Print_Params::Reset() { | 37 void PrintMsg_Print_Params::Reset() { |
39 page_size = gfx::Size(); | 38 page_size = gfx::Size(); |
40 content_size = gfx::Size(); | 39 content_size = gfx::Size(); |
41 printable_area = gfx::Rect(); | 40 printable_area = gfx::Rect(); |
42 margin_top = 0; | 41 margin_top = 0; |
43 margin_left = 0; | 42 margin_left = 0; |
44 dpi = 0; | 43 dpi = 0; |
45 min_shrink = 0; | 44 min_shrink = 0; |
46 max_shrink = 0; | 45 max_shrink = 0; |
47 desired_dpi = 0; | 46 desired_dpi = 0; |
48 document_cookie = 0; | 47 document_cookie = 0; |
49 selection_only = false; | 48 selection_only = false; |
50 supports_alpha_blend = false; | 49 supports_alpha_blend = false; |
51 preview_ui_id = -1; | 50 preview_ui_id = -1; |
52 preview_request_id = 0; | 51 preview_request_id = 0; |
53 is_first_request = false; | 52 is_first_request = false; |
54 print_scaling_option = WebKit::WebPrintScalingOptionSourceSize; | 53 print_scaling_option = WebKit::WebPrintScalingOptionSourceSize; |
55 print_to_pdf = false; | 54 print_to_pdf = false; |
56 display_header_footer = false; | 55 display_header_footer = false; |
57 date = string16(); | |
58 title = string16(); | 56 title = string16(); |
59 url = string16(); | 57 url = string16(); |
60 should_print_backgrounds = false; | 58 should_print_backgrounds = false; |
61 } | 59 } |
62 | 60 |
63 PrintMsg_PrintPages_Params::PrintMsg_PrintPages_Params() | 61 PrintMsg_PrintPages_Params::PrintMsg_PrintPages_Params() |
64 : pages() { | 62 : pages() { |
65 } | 63 } |
66 | 64 |
67 PrintMsg_PrintPages_Params::~PrintMsg_PrintPages_Params() {} | 65 PrintMsg_PrintPages_Params::~PrintMsg_PrintPages_Params() {} |
68 | 66 |
69 void PrintMsg_PrintPages_Params::Reset() { | 67 void PrintMsg_PrintPages_Params::Reset() { |
70 params.Reset(); | 68 params.Reset(); |
71 pages = std::vector<int>(); | 69 pages = std::vector<int>(); |
72 } | 70 } |
73 | 71 |
74 PrintHostMsg_RequestPrintPreview_Params:: | 72 PrintHostMsg_RequestPrintPreview_Params:: |
75 PrintHostMsg_RequestPrintPreview_Params() | 73 PrintHostMsg_RequestPrintPreview_Params() |
76 : is_modifiable(false), | 74 : is_modifiable(false), |
77 webnode_only(false), | 75 webnode_only(false), |
78 has_selection(false), | 76 has_selection(false), |
79 selection_only(false) { | 77 selection_only(false) { |
80 } | 78 } |
81 | 79 |
82 PrintHostMsg_RequestPrintPreview_Params:: | 80 PrintHostMsg_RequestPrintPreview_Params:: |
83 ~PrintHostMsg_RequestPrintPreview_Params() {} | 81 ~PrintHostMsg_RequestPrintPreview_Params() {} |
OLD | NEW |