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 #ifndef PRINTING_PRINT_SETTINGS_H_ | 5 #ifndef PRINTING_PRINT_SETTINGS_H_ |
6 #define PRINTING_PRINT_SETTINGS_H_ | 6 #define PRINTING_PRINT_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 device_name_ = device_name; | 89 device_name_ = device_name; |
90 } | 90 } |
91 const base::string16& device_name() const { return device_name_; } | 91 const base::string16& device_name() const { return device_name_; } |
92 | 92 |
93 void set_dpi(int dpi) { dpi_ = dpi; } | 93 void set_dpi(int dpi) { dpi_ = dpi; } |
94 int dpi() const { return dpi_; } | 94 int dpi() const { return dpi_; } |
95 | 95 |
96 void set_scale_factor(double scale_factor) { scale_factor_ = scale_factor; } | 96 void set_scale_factor(double scale_factor) { scale_factor_ = scale_factor; } |
97 double scale_factor() const { return scale_factor_; } | 97 double scale_factor() const { return scale_factor_; } |
98 | 98 |
99 void set_rasterize_pdf(bool rasterize_pdf) { | |
100 rasterize_pdf_ = rasterize_pdf; } | |
dsinclair
2016/12/14 19:54:38
nit: } on the next line.
rbpotter
2016/12/15 00:50:59
Done.
| |
101 bool rasterize_pdf() const { return rasterize_pdf_; } | |
102 | |
99 void set_supports_alpha_blend(bool supports_alpha_blend) { | 103 void set_supports_alpha_blend(bool supports_alpha_blend) { |
100 supports_alpha_blend_ = supports_alpha_blend; | 104 supports_alpha_blend_ = supports_alpha_blend; |
101 } | 105 } |
102 bool supports_alpha_blend() const { return supports_alpha_blend_; } | 106 bool supports_alpha_blend() const { return supports_alpha_blend_; } |
103 | 107 |
104 int device_units_per_inch() const { | 108 int device_units_per_inch() const { |
105 #if defined(OS_MACOSX) | 109 #if defined(OS_MACOSX) |
106 return 72; | 110 return 72; |
107 #else // defined(OS_MACOSX) | 111 #else // defined(OS_MACOSX) |
108 return dpi(); | 112 return dpi(); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 | 209 |
206 // Page setup in device units. | 210 // Page setup in device units. |
207 PageSetup page_setup_device_units_; | 211 PageSetup page_setup_device_units_; |
208 | 212 |
209 // Printer's device effective dots per inch in both axis. | 213 // Printer's device effective dots per inch in both axis. |
210 int dpi_; | 214 int dpi_; |
211 | 215 |
212 // Scale factor | 216 // Scale factor |
213 double scale_factor_; | 217 double scale_factor_; |
214 | 218 |
219 // True if PDF should be printed as a raster PDF | |
220 bool rasterize_pdf_; | |
221 | |
215 // Is the orientation landscape or portrait. | 222 // Is the orientation landscape or portrait. |
216 bool landscape_; | 223 bool landscape_; |
217 | 224 |
218 // True if this printer supports AlphaBlend. | 225 // True if this printer supports AlphaBlend. |
219 bool supports_alpha_blend_; | 226 bool supports_alpha_blend_; |
220 | 227 |
221 #if defined(OS_WIN) | 228 #if defined(OS_WIN) |
222 // True to print text with GDI. | 229 // True to print text with GDI. |
223 bool print_text_with_gdi_; | 230 bool print_text_with_gdi_; |
224 | 231 |
225 // True if the printer is an XPS printer. | 232 // True if the printer is an XPS printer. |
226 bool printer_is_xps_; | 233 bool printer_is_xps_; |
227 #endif | 234 #endif |
228 | 235 |
229 // If margin type is custom, this is what was requested. | 236 // If margin type is custom, this is what was requested. |
230 PageMargins requested_custom_margins_in_points_; | 237 PageMargins requested_custom_margins_in_points_; |
231 }; | 238 }; |
232 | 239 |
233 } // namespace printing | 240 } // namespace printing |
234 | 241 |
235 #endif // PRINTING_PRINT_SETTINGS_H_ | 242 #endif // PRINTING_PRINT_SETTINGS_H_ |
OLD | NEW |