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

Side by Side Diff: components/printing/common/print_messages.cc

Issue 2524143003: Print Preview: Add option to rasterize PDFs and add JPEG compression. (Closed)
Patch Set: Clean up JS Created 3 years, 12 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) 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 "base/strings/string16.h" 5 #include "base/strings/string16.h"
6 #include "printing/features/features.h" 6 #include "printing/features/features.h"
7 #include "ui/gfx/geometry/size.h" 7 #include "ui/gfx/geometry/size.h"
8 8
9 #define IPC_MESSAGE_IMPL 9 #define IPC_MESSAGE_IMPL
10 #include "components/printing/common/print_messages.h" 10 #include "components/printing/common/print_messages.h"
(...skipping 24 matching lines...) Expand all
35 #include "components/printing/common/print_messages.h" 35 #include "components/printing/common/print_messages.h"
36 } // namespace IPC 36 } // namespace IPC
37 37
38 // Generate param traits log methods. 38 // Generate param traits log methods.
39 #include "ipc/param_traits_log_macros.h" 39 #include "ipc/param_traits_log_macros.h"
40 namespace IPC { 40 namespace IPC {
41 #include "components/printing/common/print_messages.h" 41 #include "components/printing/common/print_messages.h"
42 } // namespace IPC 42 } // namespace IPC
43 43
44 PrintMsg_Print_Params::PrintMsg_Print_Params() 44 PrintMsg_Print_Params::PrintMsg_Print_Params()
45 : page_size(), 45 : page_size(),
46 content_size(), 46 content_size(),
47 printable_area(), 47 printable_area(),
48 margin_top(0), 48 margin_top(0),
49 margin_left(0), 49 margin_left(0),
50 dpi(0), 50 dpi(0),
51 scale_factor(1.0f), 51 scale_factor(1.0f),
52 desired_dpi(0), 52 desired_dpi(0),
53 document_cookie(0), 53 rasterize_pdf(false),
54 selection_only(false), 54 document_cookie(0),
55 supports_alpha_blend(false), 55 selection_only(false),
56 preview_ui_id(-1), 56 supports_alpha_blend(false),
57 preview_request_id(0), 57 preview_ui_id(-1),
58 is_first_request(false), 58 preview_request_id(0),
59 print_scaling_option(blink::WebPrintScalingOptionSourceSize), 59 is_first_request(false),
60 print_to_pdf(false), 60 print_scaling_option(blink::WebPrintScalingOptionSourceSize),
61 display_header_footer(false), 61 print_to_pdf(false),
62 title(), 62 display_header_footer(false),
63 url(), 63 title(),
64 should_print_backgrounds(false) {} 64 url(),
65 should_print_backgrounds(false) {}
65 66
66 PrintMsg_Print_Params::PrintMsg_Print_Params( 67 PrintMsg_Print_Params::PrintMsg_Print_Params(
67 const PrintMsg_Print_Params& other) = default; 68 const PrintMsg_Print_Params& other) = default;
68 69
69 PrintMsg_Print_Params::~PrintMsg_Print_Params() {} 70 PrintMsg_Print_Params::~PrintMsg_Print_Params() {}
70 71
71 void PrintMsg_Print_Params::Reset() { 72 void PrintMsg_Print_Params::Reset() {
72 page_size = gfx::Size(); 73 page_size = gfx::Size();
73 content_size = gfx::Size(); 74 content_size = gfx::Size();
74 printable_area = gfx::Rect(); 75 printable_area = gfx::Rect();
75 margin_top = 0; 76 margin_top = 0;
76 margin_left = 0; 77 margin_left = 0;
77 dpi = 0; 78 dpi = 0;
78 scale_factor = 1.0f; 79 scale_factor = 1.0f;
79 desired_dpi = 0; 80 desired_dpi = 0;
81 rasterize_pdf = false;
80 document_cookie = 0; 82 document_cookie = 0;
81 selection_only = false; 83 selection_only = false;
82 supports_alpha_blend = false; 84 supports_alpha_blend = false;
83 preview_ui_id = -1; 85 preview_ui_id = -1;
84 preview_request_id = 0; 86 preview_request_id = 0;
85 is_first_request = false; 87 is_first_request = false;
86 print_scaling_option = blink::WebPrintScalingOptionSourceSize; 88 print_scaling_option = blink::WebPrintScalingOptionSourceSize;
87 print_to_pdf = false; 89 print_to_pdf = false;
88 display_header_footer = false; 90 display_header_footer = false;
89 title = base::string16(); 91 title = base::string16();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 PrintHostMsg_SetOptionsFromDocument_Params() 123 PrintHostMsg_SetOptionsFromDocument_Params()
122 : is_scaling_disabled(false), 124 : is_scaling_disabled(false),
123 copies(0), 125 copies(0),
124 duplex(printing::UNKNOWN_DUPLEX_MODE) { 126 duplex(printing::UNKNOWN_DUPLEX_MODE) {
125 } 127 }
126 128
127 PrintHostMsg_SetOptionsFromDocument_Params:: 129 PrintHostMsg_SetOptionsFromDocument_Params::
128 ~PrintHostMsg_SetOptionsFromDocument_Params() { 130 ~PrintHostMsg_SetOptionsFromDocument_Params() {
129 } 131 }
130 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) 132 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698