Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: printing/print_settings.cc

Issue 2395373003: M54: Fix printing with XPS printers on Windows. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « printing/print_settings.h ('k') | printing/print_settings_initializer_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) 152 #if defined(OS_WIN)
153 print_text_with_gdi_ = false; 153 print_text_with_gdi_ = false;
154 printer_is_xps_ = false;
154 #endif 155 #endif
155 } 156 }
156 157
157 void PrintSettings::SetPrinterPrintableArea( 158 void PrintSettings::SetPrinterPrintableArea(
158 const gfx::Size& physical_size_device_units, 159 const gfx::Size& physical_size_device_units,
159 const gfx::Rect& printable_area_device_units, 160 const gfx::Rect& printable_area_device_units,
160 bool landscape_needs_flip) { 161 bool landscape_needs_flip) {
161 int units_per_inch = device_units_per_inch(); 162 int units_per_inch = device_units_per_inch();
162 int header_footer_text_height = 0; 163 int header_footer_text_height = 0;
163 if (display_header_footer_) { 164 if (display_header_footer_) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 241 }
241 242
242 void PrintSettings::SetOrientation(bool landscape) { 243 void PrintSettings::SetOrientation(bool landscape) {
243 if (landscape_ != landscape) { 244 if (landscape_ != landscape) {
244 landscape_ = landscape; 245 landscape_ = landscape;
245 page_setup_device_units_.FlipOrientation(); 246 page_setup_device_units_.FlipOrientation();
246 } 247 }
247 } 248 }
248 249
249 } // namespace printing 250 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_settings.h ('k') | printing/print_settings_initializer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698