OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 // Specifies the selected printer default printable area details in | 44 // Specifies the selected printer default printable area details in |
45 // points. | 45 // points. |
46 WebRect printableArea; | 46 WebRect printableArea; |
47 | 47 |
48 // Specifies the selected printer default paper size in points. | 48 // Specifies the selected printer default paper size in points. |
49 WebSize paperSize; | 49 WebSize paperSize; |
50 | 50 |
51 // Specifies user selected DPI for printing. | 51 // Specifies user selected DPI for printing. |
52 int printerDPI; | 52 int printerDPI; |
53 | 53 |
54 // Specifies whether to print PDFs as image. | |
55 bool rasterizePDF; | |
dcheng
2016/12/16 01:44:27
Consider just writing:
bool rasterizePDF = false;
rbpotter
2016/12/20 22:41:04
Done.
| |
56 | |
54 // Specifies whether to reduce/enlarge/retain the print contents to fit the | 57 // Specifies whether to reduce/enlarge/retain the print contents to fit the |
55 // printable area. (This is used only by plugin printing). | 58 // printable area. (This is used only by plugin printing). |
56 WebPrintScalingOption printScalingOption; | 59 WebPrintScalingOption printScalingOption; |
57 | 60 |
58 WebPrintParams() | 61 WebPrintParams() |
59 : printerDPI(72), | 62 : printerDPI(72), |
63 rasterizePDF(false), | |
60 printScalingOption(WebPrintScalingOptionFitToPrintableArea) {} | 64 printScalingOption(WebPrintScalingOptionFitToPrintableArea) {} |
61 | 65 |
62 WebPrintParams(const WebSize& paperSize) | 66 WebPrintParams(const WebSize& paperSize) |
63 : printContentArea(WebRect(0, 0, paperSize.width, paperSize.height)), | 67 : printContentArea(WebRect(0, 0, paperSize.width, paperSize.height)), |
64 printableArea(WebRect(0, 0, paperSize.width, paperSize.height)), | 68 printableArea(WebRect(0, 0, paperSize.width, paperSize.height)), |
65 paperSize(paperSize), | 69 paperSize(paperSize), |
66 printerDPI(72), | 70 printerDPI(72), |
71 rasterizePDF(false), | |
67 printScalingOption(WebPrintScalingOptionSourceSize) {} | 72 printScalingOption(WebPrintScalingOptionSourceSize) {} |
68 | 73 |
69 WebPrintParams(const WebRect& printContentArea, | 74 WebPrintParams(const WebRect& printContentArea, |
70 const WebRect& printableArea, | 75 const WebRect& printableArea, |
71 const WebSize& paperSize, | 76 const WebSize& paperSize, |
72 int printerDPI, | 77 int printerDPI, |
73 WebPrintScalingOption printScalingOption) | 78 WebPrintScalingOption printScalingOption) |
74 : printContentArea(printContentArea), | 79 : printContentArea(printContentArea), |
75 printableArea(printableArea), | 80 printableArea(printableArea), |
76 paperSize(paperSize), | 81 paperSize(paperSize), |
77 printerDPI(printerDPI), | 82 printerDPI(printerDPI), |
83 rasterizePDF(false), | |
78 printScalingOption(printScalingOption) {} | 84 printScalingOption(printScalingOption) {} |
79 }; | 85 }; |
80 | 86 |
81 } // namespace blink | 87 } // namespace blink |
82 | 88 |
83 #endif | 89 #endif |
OLD | NEW |