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 #include "printing/print_settings.h" | 5 #include "printing/print_settings.h" |
6 | 6 |
7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "printing/print_job_constants.h" | 10 #include "printing/print_job_constants.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 requested_media_ = RequestedMedia(); | 147 requested_media_ = RequestedMedia(); |
148 page_setup_device_units_.Clear(); | 148 page_setup_device_units_.Clear(); |
149 dpi_ = 0; | 149 dpi_ = 0; |
150 scale_factor_ = 1.0f; | 150 scale_factor_ = 1.0f; |
151 rasterize_pdf_ = false; | 151 rasterize_pdf_ = false; |
152 landscape_ = false; | 152 landscape_ = false; |
153 supports_alpha_blend_ = true; | 153 supports_alpha_blend_ = true; |
154 #if defined(OS_WIN) | 154 #if defined(OS_WIN) |
155 print_text_with_gdi_ = false; | 155 print_text_with_gdi_ = false; |
156 printer_is_xps_ = false; | 156 printer_is_xps_ = false; |
| 157 printer_is_ps2_ = false; |
| 158 printer_is_ps3_ = false; |
157 #endif | 159 #endif |
158 } | 160 } |
159 | 161 |
160 void PrintSettings::SetPrinterPrintableArea( | 162 void PrintSettings::SetPrinterPrintableArea( |
161 const gfx::Size& physical_size_device_units, | 163 const gfx::Size& physical_size_device_units, |
162 const gfx::Rect& printable_area_device_units, | 164 const gfx::Rect& printable_area_device_units, |
163 bool landscape_needs_flip) { | 165 bool landscape_needs_flip) { |
164 int units_per_inch = device_units_per_inch(); | 166 int units_per_inch = device_units_per_inch(); |
165 int header_footer_text_height = 0; | 167 int header_footer_text_height = 0; |
166 if (display_header_footer_) { | 168 if (display_header_footer_) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 245 } |
244 | 246 |
245 void PrintSettings::SetOrientation(bool landscape) { | 247 void PrintSettings::SetOrientation(bool landscape) { |
246 if (landscape_ != landscape) { | 248 if (landscape_ != landscape) { |
247 landscape_ = landscape; | 249 landscape_ = landscape; |
248 page_setup_device_units_.FlipOrientation(); | 250 page_setup_device_units_.FlipOrientation(); |
249 } | 251 } |
250 } | 252 } |
251 | 253 |
252 } // namespace printing | 254 } // namespace printing |
OLD | NEW |