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

Side by Side Diff: printing/print_settings.cc

Issue 2795453002: Use DPI from Print Preview on Windows, handle non square (Closed)
Patch Set: Address comments Created 3 years, 8 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_conversion.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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 url_.clear(); 165 url_.clear();
166 display_header_footer_ = false; 166 display_header_footer_ = false;
167 should_print_backgrounds_ = false; 167 should_print_backgrounds_ = false;
168 collate_ = false; 168 collate_ = false;
169 color_ = UNKNOWN_COLOR_MODEL; 169 color_ = UNKNOWN_COLOR_MODEL;
170 copies_ = 0; 170 copies_ = 0;
171 duplex_mode_ = UNKNOWN_DUPLEX_MODE; 171 duplex_mode_ = UNKNOWN_DUPLEX_MODE;
172 device_name_.clear(); 172 device_name_.clear();
173 requested_media_ = RequestedMedia(); 173 requested_media_ = RequestedMedia();
174 page_setup_device_units_.Clear(); 174 page_setup_device_units_.Clear();
175 dpi_ = 0; 175 dpi_[0] = 0;
176 dpi_[1] = 0;
176 scale_factor_ = 1.0f; 177 scale_factor_ = 1.0f;
177 rasterize_pdf_ = false; 178 rasterize_pdf_ = false;
178 landscape_ = false; 179 landscape_ = false;
179 supports_alpha_blend_ = true; 180 supports_alpha_blend_ = true;
180 #if defined(OS_WIN) 181 #if defined(OS_WIN)
181 print_text_with_gdi_ = false; 182 print_text_with_gdi_ = false;
182 printer_type_ = PrintSettings::PrinterType::TYPE_NONE; 183 printer_type_ = PrintSettings::PrinterType::TYPE_NONE;
183 #endif 184 #endif
184 } 185 }
185 186
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 288 }
288 289
289 void PrintSettings::SetOrientation(bool landscape) { 290 void PrintSettings::SetOrientation(bool landscape) {
290 if (landscape_ != landscape) { 291 if (landscape_ != landscape) {
291 landscape_ = landscape; 292 landscape_ = landscape;
292 page_setup_device_units_.FlipOrientation(); 293 page_setup_device_units_.FlipOrientation();
293 } 294 }
294 } 295 }
295 296
296 } // namespace printing 297 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_settings.h ('k') | printing/print_settings_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698