| 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) { rasterize_pdf_ = rasterize_pdf; } |
| 100 bool rasterize_pdf() const { return rasterize_pdf_; } |
| 101 |
| 99 void set_supports_alpha_blend(bool supports_alpha_blend) { | 102 void set_supports_alpha_blend(bool supports_alpha_blend) { |
| 100 supports_alpha_blend_ = supports_alpha_blend; | 103 supports_alpha_blend_ = supports_alpha_blend; |
| 101 } | 104 } |
| 102 bool supports_alpha_blend() const { return supports_alpha_blend_; } | 105 bool supports_alpha_blend() const { return supports_alpha_blend_; } |
| 103 | 106 |
| 104 int device_units_per_inch() const { | 107 int device_units_per_inch() const { |
| 105 #if defined(OS_MACOSX) | 108 #if defined(OS_MACOSX) |
| 106 return 72; | 109 return 72; |
| 107 #else // defined(OS_MACOSX) | 110 #else // defined(OS_MACOSX) |
| 108 return dpi(); | 111 return dpi(); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 208 |
| 206 // Page setup in device units. | 209 // Page setup in device units. |
| 207 PageSetup page_setup_device_units_; | 210 PageSetup page_setup_device_units_; |
| 208 | 211 |
| 209 // Printer's device effective dots per inch in both axis. | 212 // Printer's device effective dots per inch in both axis. |
| 210 int dpi_; | 213 int dpi_; |
| 211 | 214 |
| 212 // Scale factor | 215 // Scale factor |
| 213 double scale_factor_; | 216 double scale_factor_; |
| 214 | 217 |
| 218 // True if PDF should be printed as a raster PDF |
| 219 bool rasterize_pdf_; |
| 220 |
| 215 // Is the orientation landscape or portrait. | 221 // Is the orientation landscape or portrait. |
| 216 bool landscape_; | 222 bool landscape_; |
| 217 | 223 |
| 218 // True if this printer supports AlphaBlend. | 224 // True if this printer supports AlphaBlend. |
| 219 bool supports_alpha_blend_; | 225 bool supports_alpha_blend_; |
| 220 | 226 |
| 221 #if defined(OS_WIN) | 227 #if defined(OS_WIN) |
| 222 // True to print text with GDI. | 228 // True to print text with GDI. |
| 223 bool print_text_with_gdi_; | 229 bool print_text_with_gdi_; |
| 224 | 230 |
| 225 // True if the printer is an XPS printer. | 231 // True if the printer is an XPS printer. |
| 226 bool printer_is_xps_; | 232 bool printer_is_xps_; |
| 227 #endif | 233 #endif |
| 228 | 234 |
| 229 // If margin type is custom, this is what was requested. | 235 // If margin type is custom, this is what was requested. |
| 230 PageMargins requested_custom_margins_in_points_; | 236 PageMargins requested_custom_margins_in_points_; |
| 231 }; | 237 }; |
| 232 | 238 |
| 233 } // namespace printing | 239 } // namespace printing |
| 234 | 240 |
| 235 #endif // PRINTING_PRINT_SETTINGS_H_ | 241 #endif // PRINTING_PRINT_SETTINGS_H_ |
| OLD | NEW |