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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 requested_media_ = RequestedMedia(); | 142 requested_media_ = RequestedMedia(); |
143 page_setup_device_units_.Clear(); | 143 page_setup_device_units_.Clear(); |
144 dpi_ = 0; | 144 dpi_ = 0; |
145 landscape_ = false; | 145 landscape_ = false; |
146 supports_alpha_blend_ = true; | 146 supports_alpha_blend_ = true; |
147 should_print_backgrounds_ = false; | 147 should_print_backgrounds_ = false; |
148 collate_ = false; | 148 collate_ = false; |
149 color_ = UNKNOWN_COLOR_MODEL; | 149 color_ = UNKNOWN_COLOR_MODEL; |
150 copies_ = 0; | 150 copies_ = 0; |
151 duplex_mode_ = UNKNOWN_DUPLEX_MODE; | 151 duplex_mode_ = UNKNOWN_DUPLEX_MODE; |
| 152 #if defined(OS_WIN) |
| 153 print_text_with_gdi_ = false; |
| 154 #endif |
152 } | 155 } |
153 | 156 |
154 void PrintSettings::SetPrinterPrintableArea( | 157 void PrintSettings::SetPrinterPrintableArea( |
155 const gfx::Size& physical_size_device_units, | 158 const gfx::Size& physical_size_device_units, |
156 const gfx::Rect& printable_area_device_units, | 159 const gfx::Rect& printable_area_device_units, |
157 bool landscape_needs_flip) { | 160 bool landscape_needs_flip) { |
158 int units_per_inch = device_units_per_inch(); | 161 int units_per_inch = device_units_per_inch(); |
159 int header_footer_text_height = 0; | 162 int header_footer_text_height = 0; |
160 if (display_header_footer_) { | 163 if (display_header_footer_) { |
161 // Hard-code text_height = 0.5cm = ~1/5 of inch. | 164 // Hard-code text_height = 0.5cm = ~1/5 of inch. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 240 } |
238 | 241 |
239 void PrintSettings::SetOrientation(bool landscape) { | 242 void PrintSettings::SetOrientation(bool landscape) { |
240 if (landscape_ != landscape) { | 243 if (landscape_ != landscape) { |
241 landscape_ = landscape; | 244 landscape_ = landscape; |
242 page_setup_device_units_.FlipOrientation(); | 245 page_setup_device_units_.FlipOrientation(); |
243 } | 246 } |
244 } | 247 } |
245 | 248 |
246 } // namespace printing | 249 } // namespace printing |
OLD | NEW |