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

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

Issue 2524143003: Print Preview: Add option to rasterize PDFs and add JPEG compression. (Closed)
Patch Set: Clean up JS Created 4 years 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 // IPC messages for printing. 5 // IPC messages for printing.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 void Reset(); 40 void Reset();
41 41
42 gfx::Size page_size; 42 gfx::Size page_size;
43 gfx::Size content_size; 43 gfx::Size content_size;
44 gfx::Rect printable_area; 44 gfx::Rect printable_area;
45 int margin_top; 45 int margin_top;
46 int margin_left; 46 int margin_left;
47 double dpi; 47 double dpi;
48 double scale_factor; 48 double scale_factor;
49 int desired_dpi; 49 int desired_dpi;
50 bool rasterize_pdf;
50 int document_cookie; 51 int document_cookie;
51 bool selection_only; 52 bool selection_only;
52 bool supports_alpha_blend; 53 bool supports_alpha_blend;
53 int32_t preview_ui_id; 54 int32_t preview_ui_id;
54 int preview_request_id; 55 int preview_request_id;
55 bool is_first_request; 56 bool is_first_request;
56 blink::WebPrintScalingOption print_scaling_option; 57 blink::WebPrintScalingOption print_scaling_option;
57 bool print_to_pdf; 58 bool print_to_pdf;
58 bool display_header_footer; 59 bool display_header_footer;
59 base::string16 title; 60 base::string16 title;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 122
122 // Specifies dots per inch. 123 // Specifies dots per inch.
123 IPC_STRUCT_TRAITS_MEMBER(dpi) 124 IPC_STRUCT_TRAITS_MEMBER(dpi)
124 125
125 // Specifies the scale factor in percent 126 // Specifies the scale factor in percent
126 IPC_STRUCT_TRAITS_MEMBER(scale_factor) 127 IPC_STRUCT_TRAITS_MEMBER(scale_factor)
127 128
128 // Desired apparent dpi on paper. 129 // Desired apparent dpi on paper.
129 IPC_STRUCT_TRAITS_MEMBER(desired_dpi) 130 IPC_STRUCT_TRAITS_MEMBER(desired_dpi)
130 131
132 // Whether to rasterize a PDF for printing
Lei Zhang 2017/02/25 01:01:16 Move this down below line 144 somewhere?
133 IPC_STRUCT_TRAITS_MEMBER(rasterize_pdf)
134
131 // Cookie for the document to ensure correctness. 135 // Cookie for the document to ensure correctness.
132 IPC_STRUCT_TRAITS_MEMBER(document_cookie) 136 IPC_STRUCT_TRAITS_MEMBER(document_cookie)
133 137
134 // Should only print currently selected text. 138 // Should only print currently selected text.
135 IPC_STRUCT_TRAITS_MEMBER(selection_only) 139 IPC_STRUCT_TRAITS_MEMBER(selection_only)
136 140
137 // Does the printer support alpha blending? 141 // Does the printer support alpha blending?
138 IPC_STRUCT_TRAITS_MEMBER(supports_alpha_blend) 142 IPC_STRUCT_TRAITS_MEMBER(supports_alpha_blend)
139 143
140 // *** Parameters below are used only for print preview. *** 144 // *** Parameters below are used only for print preview. ***
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 482
479 // Tell the browser to show the print preview, when the document is sufficiently 483 // Tell the browser to show the print preview, when the document is sufficiently
480 // loaded such that the renderer can determine whether it is modifiable or not. 484 // loaded such that the renderer can determine whether it is modifiable or not.
481 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, 485 IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview,
482 bool /* is_modifiable */) 486 bool /* is_modifiable */)
483 487
484 // Notify the browser to set print presets based on source PDF document. 488 // Notify the browser to set print presets based on source PDF document.
485 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument, 489 IPC_MESSAGE_ROUTED1(PrintHostMsg_SetOptionsFromDocument,
486 PrintHostMsg_SetOptionsFromDocument_Params /* params */) 490 PrintHostMsg_SetOptionsFromDocument_Params /* params */)
487 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) 491 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698