[email protected] | 71f40a7 | 2012-05-16 07:26:59 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
[email protected] | 8ff1d42 | 2009-07-07 21:31:39 | [diff] [blame] | 5 | #ifndef PRINTING_PRINT_SETTINGS_H_ |
| 6 | #define PRINTING_PRINT_SETTINGS_H_ |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 7 | |
rbpotter | 116c2e1 | 2017-04-04 19:21:28 | [diff] [blame] | 8 | #include <algorithm> |
[email protected] | dcd1e886 | 2011-08-09 06:06:58 | [diff] [blame] | 9 | #include <string> |
| 10 | |
Vladislav Kuzkokov | 1999822 | 2019-08-12 14:26:09 | [diff] [blame] | 11 | #include "base/macros.h" |
[email protected] | 896d161f | 2013-06-11 22:52:24 | [diff] [blame] | 12 | #include "base/strings/string16.h" |
[email protected] | 8ff1d42 | 2009-07-07 21:31:39 | [diff] [blame] | 13 | #include "printing/page_range.h" |
| 14 | #include "printing/page_setup.h" |
[email protected] | 1c23b4e8 | 2011-10-15 22:30:48 | [diff] [blame] | 15 | #include "printing/print_job_constants.h" |
[email protected] | 63313ae | 2011-10-13 00:40:39 | [diff] [blame] | 16 | #include "printing/printing_export.h" |
tfarina | 3b0452d | 2014-12-31 15:20:09 | [diff] [blame] | 17 | #include "ui/gfx/geometry/rect.h" |
rbpotter | 213a4f7 | 2017-12-22 22:58:09 | [diff] [blame] | 18 | #include "ui/gfx/geometry/size.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 19 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 20 | namespace printing { |
| 21 | |
[email protected] | 675a1ae | 2013-10-14 20:24:37 | [diff] [blame] | 22 | // Returns true if |color_mode| is color and not B&W. |
| 23 | PRINTING_EXPORT bool IsColorModelSelected(int color_mode); |
[email protected] | 63313ae | 2011-10-13 00:40:39 | [diff] [blame] | 24 | |
[email protected] | fa879e51 | 2011-11-08 20:39:01 | [diff] [blame] | 25 | #if defined(USE_CUPS) |
| 26 | // Get the color model setting name and value for the |color_mode|. |
| 27 | PRINTING_EXPORT void GetColorModelForMode(int color_mode, |
| 28 | std::string* color_setting_name, |
| 29 | std::string* color_value); |
[email protected] | 63313ae | 2011-10-13 00:40:39 | [diff] [blame] | 30 | #endif |
| 31 | |
halcanary | 73b63fd | 2015-11-06 00:02:14 | [diff] [blame] | 32 | // Inform the printing system that it may embed this user-agent string |
| 33 | // in its output's metadata. |
| 34 | PRINTING_EXPORT void SetAgent(const std::string& user_agent); |
| 35 | PRINTING_EXPORT const std::string& GetAgent(); |
| 36 | |
[email protected] | 69f5b1e6 | 2011-09-01 06:34:04 | [diff] [blame] | 37 | class PRINTING_EXPORT PrintSettings { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 38 | public: |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame] | 39 | #if defined(OS_WIN) |
| 40 | enum PrinterType { |
| 41 | TYPE_NONE = 0, |
rbpotter | 0437a171 | 2017-07-14 21:23:24 | [diff] [blame] | 42 | TYPE_TEXTONLY, |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame] | 43 | TYPE_XPS, |
| 44 | TYPE_POSTSCRIPT_LEVEL2, |
| 45 | TYPE_POSTSCRIPT_LEVEL3 |
| 46 | }; |
| 47 | #endif |
| 48 | |
[email protected] | 72ddef9 | 2014-06-12 08:08:06 | [diff] [blame] | 49 | // Media properties requested by the user. Default instance represents |
| 50 | // default media selection. |
| 51 | struct RequestedMedia { |
| 52 | // Size of the media, in microns. |
| 53 | gfx::Size size_microns; |
| 54 | // Platform specific id to map it back to the particular media. |
| 55 | std::string vendor_id; |
| 56 | |
| 57 | bool IsDefault() const { |
| 58 | return size_microns.IsEmpty() && vendor_id.empty(); |
| 59 | } |
| 60 | }; |
| 61 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 62 | PrintSettings(); |
[email protected] | 20f0487a | 2010-09-30 20:06:30 | [diff] [blame] | 63 | ~PrintSettings(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 64 | |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 65 | // Reinitialize the settings to the default values. |
| 66 | void Clear(); |
| 67 | |
[email protected] | b076a08 | 2011-10-20 01:26:32 | [diff] [blame] | 68 | void SetCustomMargins(const PageMargins& requested_margins_in_points); |
[email protected] | c95198b | 2014-06-12 16:56:55 | [diff] [blame] | 69 | const PageMargins& requested_custom_margins_in_points() const { |
| 70 | return requested_custom_margins_in_points_; |
| 71 | } |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 72 | void set_margin_type(MarginType margin_type) { margin_type_ = margin_type; } |
| 73 | MarginType margin_type() const { return margin_type_; } |
[email protected] | 1c23b4e8 | 2011-10-15 22:30:48 | [diff] [blame] | 74 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 75 | // Updates the orientation and flip the page if needed. |
| 76 | void SetOrientation(bool landscape); |
| 77 | bool landscape() const { return landscape_; } |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 78 | |
[email protected] | 72ddef9 | 2014-06-12 08:08:06 | [diff] [blame] | 79 | // Updates user requested media. |
| 80 | void set_requested_media(const RequestedMedia& media) { |
| 81 | requested_media_ = media; |
| 82 | } |
| 83 | // Media properties requested by the user. Translated into device media by the |
| 84 | // platform specific layers. |
Lei Zhang | 01a1d3c0 | 2019-05-21 04:59:10 | [diff] [blame] | 85 | const RequestedMedia& requested_media() const { return requested_media_; } |
[email protected] | 72ddef9 | 2014-06-12 08:08:06 | [diff] [blame] | 86 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 87 | // Set printer printable area in in device units. |
| 88 | // Some platforms already provide flipped area. Set |landscape_needs_flip| |
| 89 | // to false on those platforms to avoid double flipping. |
Vladislav Kuzkokov | a3f4af8f | 2017-11-28 15:20:26 | [diff] [blame] | 90 | // This method assumes correct DPI is already set. |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 91 | void SetPrinterPrintableArea(const gfx::Size& physical_size_device_units, |
| 92 | const gfx::Rect& printable_area_device_units, |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 93 | bool landscape_needs_flip); |
| 94 | const PageSetup& page_setup_device_units() const { |
| 95 | return page_setup_device_units_; |
| 96 | } |
| 97 | |
[email protected] | b5fa4ee | 2013-10-01 07:19:07 | [diff] [blame] | 98 | void set_device_name(const base::string16& device_name) { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 99 | device_name_ = device_name; |
| 100 | } |
[email protected] | b5fa4ee | 2013-10-01 07:19:07 | [diff] [blame] | 101 | const base::string16& device_name() const { return device_name_; } |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 102 | |
rbpotter | 213a4f7 | 2017-12-22 22:58:09 | [diff] [blame] | 103 | void set_dpi(int dpi) { dpi_ = gfx::Size(dpi, dpi); } |
rbpotter | 116c2e1 | 2017-04-04 19:21:28 | [diff] [blame] | 104 | void set_dpi_xy(int dpi_horizontal, int dpi_vertical) { |
rbpotter | 213a4f7 | 2017-12-22 22:58:09 | [diff] [blame] | 105 | dpi_ = gfx::Size(dpi_horizontal, dpi_vertical); |
rbpotter | 116c2e1 | 2017-04-04 19:21:28 | [diff] [blame] | 106 | } |
rbpotter | 213a4f7 | 2017-12-22 22:58:09 | [diff] [blame] | 107 | |
| 108 | int dpi() const { return std::max(dpi_.width(), dpi_.height()); } |
| 109 | int dpi_horizontal() const { return dpi_.width(); } |
| 110 | int dpi_vertical() const { return dpi_.height(); } |
rbpotter | e33e8e62 | 2018-01-25 01:10:33 | [diff] [blame] | 111 | const gfx::Size& dpi_size() const { return dpi_; } |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 112 | |
rbpotter | 769ffdf | 2016-10-26 00:53:57 | [diff] [blame] | 113 | void set_scale_factor(double scale_factor) { scale_factor_ = scale_factor; } |
| 114 | double scale_factor() const { return scale_factor_; } |
| 115 | |
rbpotter | 0fab35602 | 2016-12-28 22:00:23 | [diff] [blame] | 116 | void set_rasterize_pdf(bool rasterize_pdf) { rasterize_pdf_ = rasterize_pdf; } |
| 117 | bool rasterize_pdf() const { return rasterize_pdf_; } |
| 118 | |
[email protected] | b2b0fce | 2011-01-12 16:34:40 | [diff] [blame] | 119 | void set_supports_alpha_blend(bool supports_alpha_blend) { |
| 120 | supports_alpha_blend_ = supports_alpha_blend; |
| 121 | } |
| 122 | bool supports_alpha_blend() const { return supports_alpha_blend_; } |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 123 | |
[email protected] | 6ab86ac | 2010-05-29 07:18:29 | [diff] [blame] | 124 | int device_units_per_inch() const { |
| 125 | #if defined(OS_MACOSX) |
| 126 | return 72; |
Lei Zhang | 01a1d3c0 | 2019-05-21 04:59:10 | [diff] [blame] | 127 | #else // defined(OS_MACOSX) |
[email protected] | 6ab86ac | 2010-05-29 07:18:29 | [diff] [blame] | 128 | return dpi(); |
| 129 | #endif // defined(OS_MACOSX) |
| 130 | } |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 131 | |
thestig | e85e6b6 | 2016-08-25 00:00:06 | [diff] [blame] | 132 | void set_ranges(const PageRanges& ranges) { ranges_ = ranges; } |
| 133 | const PageRanges& ranges() const { return ranges_; } |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 134 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 135 | void set_selection_only(bool selection_only) { |
| 136 | selection_only_ = selection_only; |
| 137 | } |
| 138 | bool selection_only() const { return selection_only_; } |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 139 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 140 | void set_should_print_backgrounds(bool should_print_backgrounds) { |
| 141 | should_print_backgrounds_ = should_print_backgrounds; |
| 142 | } |
| 143 | bool should_print_backgrounds() const { return should_print_backgrounds_; } |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 144 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 145 | void set_display_header_footer(bool display_header_footer) { |
| 146 | display_header_footer_ = display_header_footer; |
| 147 | } |
| 148 | bool display_header_footer() const { return display_header_footer_; } |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 149 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 150 | void set_title(const base::string16& title) { title_ = title; } |
| 151 | const base::string16& title() const { return title_; } |
[email protected] | c8ad40c | 2009-06-08 17:05:21 | [diff] [blame] | 152 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 153 | void set_url(const base::string16& url) { url_ = url; } |
| 154 | const base::string16& url() const { return url_; } |
| 155 | |
| 156 | void set_collate(bool collate) { collate_ = collate; } |
| 157 | bool collate() const { return collate_; } |
| 158 | |
| 159 | void set_color(ColorModel color) { color_ = color; } |
| 160 | ColorModel color() const { return color_; } |
| 161 | |
| 162 | void set_copies(int copies) { copies_ = copies; } |
| 163 | int copies() const { return copies_; } |
| 164 | |
| 165 | void set_duplex_mode(DuplexMode duplex_mode) { duplex_mode_ = duplex_mode; } |
| 166 | DuplexMode duplex_mode() const { return duplex_mode_; } |
| 167 | |
thestig | e85e6b6 | 2016-08-25 00:00:06 | [diff] [blame] | 168 | #if defined(OS_WIN) |
| 169 | void set_print_text_with_gdi(bool use_gdi) { print_text_with_gdi_ = use_gdi; } |
| 170 | bool print_text_with_gdi() const { return print_text_with_gdi_; } |
thestig | 1f8436b | 2016-10-06 01:09:25 | [diff] [blame] | 171 | |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame] | 172 | void set_printer_type(PrinterType type) { printer_type_ = type; } |
rbpotter | 0437a171 | 2017-07-14 21:23:24 | [diff] [blame] | 173 | bool printer_is_textonly() const { |
| 174 | return printer_type_ == PrinterType::TYPE_TEXTONLY; |
| 175 | } |
Lei Zhang | 01a1d3c0 | 2019-05-21 04:59:10 | [diff] [blame] | 176 | bool printer_is_xps() const { return printer_type_ == PrinterType::TYPE_XPS; } |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame] | 177 | bool printer_is_ps2() const { |
| 178 | return printer_type_ == PrinterType::TYPE_POSTSCRIPT_LEVEL2; |
| 179 | } |
| 180 | bool printer_is_ps3() const { |
| 181 | return printer_type_ == PrinterType::TYPE_POSTSCRIPT_LEVEL3; |
| 182 | } |
thestig | e85e6b6 | 2016-08-25 00:00:06 | [diff] [blame] | 183 | #endif |
| 184 | |
Wei Li | 02720a4 | 2017-10-25 22:06:48 | [diff] [blame] | 185 | void set_is_modifiable(bool is_modifiable) { is_modifiable_ = is_modifiable; } |
| 186 | bool is_modifiable() const { return is_modifiable_; } |
| 187 | |
xlou | 6bd7c2d | 2018-07-10 01:35:40 | [diff] [blame] | 188 | int pages_per_sheet() const { return pages_per_sheet_; } |
| 189 | void set_pages_per_sheet(int pages_per_sheet) { |
| 190 | pages_per_sheet_ = pages_per_sheet; |
xlou | 19420756 | 2018-04-26 23:42:44 | [diff] [blame] | 191 | } |
| 192 | |
Vladislav Kuzkokov | 48b1500 | 2019-01-30 17:13:35 | [diff] [blame] | 193 | #if defined(OS_CHROMEOS) |
| 194 | void set_send_user_info(bool send_user_info) { |
| 195 | send_user_info_ = send_user_info; |
| 196 | } |
| 197 | bool send_user_info() const { return send_user_info_; } |
| 198 | |
| 199 | void set_username(const std::string& username) { username_ = username; } |
| 200 | const std::string& username() const { return username_; } |
Nikita Podguzov | c1bf3f8 | 2019-03-19 15:23:23 | [diff] [blame] | 201 | |
| 202 | void set_pin_value(const std::string& pin_value) { pin_value_ = pin_value; } |
| 203 | const std::string& pin_value() const { return pin_value_; } |
Vladislav Kuzkokov | 48b1500 | 2019-01-30 17:13:35 | [diff] [blame] | 204 | #endif |
| 205 | |
[email protected] | d30e8e64 | 2008-08-06 12:05:24 | [diff] [blame] | 206 | // Cookie generator. It is used to initialize PrintedDocument with its |
| 207 | // associated PrintSettings, to be sure that each generated PrintedPage is |
| 208 | // correctly associated with its corresponding PrintedDocument. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 209 | static int NewCookie(); |
| 210 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 211 | private: |
| 212 | // Multi-page printing. Each PageRange describes a from-to page combination. |
| 213 | // This permits printing selected pages only. |
| 214 | PageRanges ranges_; |
| 215 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 216 | // Indicates if the user only wants to print the current selection. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 217 | bool selection_only_; |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 218 | |
| 219 | // Indicates what kind of margins should be applied to the printable area. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 220 | MarginType margin_type_; |
[email protected] | c48bee2 | 2011-03-29 02:36:26 | [diff] [blame] | 221 | |
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 222 | // Strings to be printed as headers and footers if requested by the user. |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 223 | base::string16 title_; |
| 224 | base::string16 url_; |
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 225 | |
| 226 | // True if the user wants headers and footers to be displayed. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 227 | bool display_header_footer_; |
[email protected] | 55b23a0 | 2011-08-17 23:09:36 | [diff] [blame] | 228 | |
[email protected] | 19d1c2d | 2013-01-14 00:59:46 | [diff] [blame] | 229 | // True if the user wants to print CSS backgrounds. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 230 | bool should_print_backgrounds_; |
[email protected] | 19d1c2d | 2013-01-14 00:59:46 | [diff] [blame] | 231 | |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 232 | // True if the user wants to print with collate. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 233 | bool collate_; |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 234 | |
| 235 | // True if the user wants to print with collate. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 236 | ColorModel color_; |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 237 | |
| 238 | // Number of copies user wants to print. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 239 | int copies_; |
[email protected] | e5324b5 | 2013-10-29 03:16:37 | [diff] [blame] | 240 | |
| 241 | // Duplex type user wants to use. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 242 | DuplexMode duplex_mode_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 243 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 244 | // Printer device name as opened by the OS. |
[email protected] | b5fa4ee | 2013-10-01 07:19:07 | [diff] [blame] | 245 | base::string16 device_name_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 246 | |
[email protected] | 72ddef9 | 2014-06-12 08:08:06 | [diff] [blame] | 247 | // Media requested by the user. |
| 248 | RequestedMedia requested_media_; |
| 249 | |
[email protected] | 6ab86ac | 2010-05-29 07:18:29 | [diff] [blame] | 250 | // Page setup in device units. |
| 251 | PageSetup page_setup_device_units_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 252 | |
rbpotter | 116c2e1 | 2017-04-04 19:21:28 | [diff] [blame] | 253 | // Printer's device effective dots per inch in both axes. The two values will |
| 254 | // generally be identical. However, on Windows, there are a few rare printers |
| 255 | // that support resolutions with different DPI in different dimensions. |
rbpotter | 213a4f7 | 2017-12-22 22:58:09 | [diff] [blame] | 256 | gfx::Size dpi_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 257 | |
rbpotter | 769ffdf | 2016-10-26 00:53:57 | [diff] [blame] | 258 | // Scale factor |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 259 | double scale_factor_; |
rbpotter | 769ffdf | 2016-10-26 00:53:57 | [diff] [blame] | 260 | |
rbpotter | 0fab35602 | 2016-12-28 22:00:23 | [diff] [blame] | 261 | // True if PDF should be printed as a raster PDF |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 262 | bool rasterize_pdf_; |
rbpotter | 0fab35602 | 2016-12-28 22:00:23 | [diff] [blame] | 263 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 264 | // Is the orientation landscape or portrait. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 265 | bool landscape_; |
[email protected] | b2b0fce | 2011-01-12 16:34:40 | [diff] [blame] | 266 | |
| 267 | // True if this printer supports AlphaBlend. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 268 | bool supports_alpha_blend_; |
[email protected] | 1c23b4e8 | 2011-10-15 22:30:48 | [diff] [blame] | 269 | |
thestig | e85e6b6 | 2016-08-25 00:00:06 | [diff] [blame] | 270 | #if defined(OS_WIN) |
| 271 | // True to print text with GDI. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 272 | bool print_text_with_gdi_; |
thestig | 1f8436b | 2016-10-06 01:09:25 | [diff] [blame] | 273 | |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 274 | PrinterType printer_type_; |
thestig | e85e6b6 | 2016-08-25 00:00:06 | [diff] [blame] | 275 | #endif |
| 276 | |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 277 | bool is_modifiable_; |
Wei Li | 02720a4 | 2017-10-25 22:06:48 | [diff] [blame] | 278 | |
[email protected] | b076a08 | 2011-10-20 01:26:32 | [diff] [blame] | 279 | // If margin type is custom, this is what was requested. |
| 280 | PageMargins requested_custom_margins_in_points_; |
xlou | 19420756 | 2018-04-26 23:42:44 | [diff] [blame] | 281 | |
| 282 | // Number of pages per sheet. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 283 | int pages_per_sheet_; |
Vladislav Kuzkokov | 48b1500 | 2019-01-30 17:13:35 | [diff] [blame] | 284 | |
| 285 | #if defined(OS_CHROMEOS) |
| 286 | // Whether to send user info. |
Vladislav Kuzkokov | 56e6bbbd | 2019-08-21 18:48:18 | [diff] [blame^] | 287 | bool send_user_info_; |
Vladislav Kuzkokov | 48b1500 | 2019-01-30 17:13:35 | [diff] [blame] | 288 | |
| 289 | // Username if it's required by the printer. |
| 290 | std::string username_; |
Nikita Podguzov | c1bf3f8 | 2019-03-19 15:23:23 | [diff] [blame] | 291 | |
Vladislav Kuzkokov | 9f46117 | 2019-04-25 13:09:09 | [diff] [blame] | 292 | // Job title if it's required by the printer. |
| 293 | std::string job_title_; |
| 294 | |
Nikita Podguzov | c1bf3f8 | 2019-03-19 15:23:23 | [diff] [blame] | 295 | // PIN code entered by the user. |
| 296 | std::string pin_value_; |
Vladislav Kuzkokov | 48b1500 | 2019-01-30 17:13:35 | [diff] [blame] | 297 | #endif |
Vladislav Kuzkokov | 1999822 | 2019-08-12 14:26:09 | [diff] [blame] | 298 | |
| 299 | DISALLOW_COPY_AND_ASSIGN(PrintSettings); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 300 | }; |
| 301 | |
| 302 | } // namespace printing |
| 303 | |
[email protected] | 8ff1d42 | 2009-07-07 21:31:39 | [diff] [blame] | 304 | #endif // PRINTING_PRINT_SETTINGS_H_ |