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

Side by Side Diff: printing/print_settings.cc

Issue 2795453002: Use DPI from Print Preview on Windows, handle non square (Closed)
Patch Set: 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
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 Clear(); 152 Clear();
153 } 153 }
154 154
155 PrintSettings::PrintSettings(const PrintSettings& other) = default; 155 PrintSettings::PrintSettings(const PrintSettings& other) = default;
156 156
157 PrintSettings::~PrintSettings() { 157 PrintSettings::~PrintSettings() {
158 } 158 }
159 159
160 void PrintSettings::Clear() { 160 void PrintSettings::Clear() {
161 ranges_.clear(); 161 ranges_.clear();
162 desired_dpi_ = 72; 162 #if defined(OS_WIN)
163 desired_dpi_[0] = 0;
164 desired_dpi_[1] = 0;
165 #else
166 desired_dpi_[0] = 72;
167 desired_dpi_[1] = 72;
168 #endif
163 selection_only_ = false; 169 selection_only_ = false;
164 margin_type_ = DEFAULT_MARGINS; 170 margin_type_ = DEFAULT_MARGINS;
165 title_.clear(); 171 title_.clear();
166 url_.clear(); 172 url_.clear();
167 display_header_footer_ = false; 173 display_header_footer_ = false;
168 should_print_backgrounds_ = false; 174 should_print_backgrounds_ = false;
169 collate_ = false; 175 collate_ = false;
170 color_ = UNKNOWN_COLOR_MODEL; 176 color_ = UNKNOWN_COLOR_MODEL;
171 copies_ = 0; 177 copies_ = 0;
172 duplex_mode_ = UNKNOWN_DUPLEX_MODE; 178 duplex_mode_ = UNKNOWN_DUPLEX_MODE;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 294 }
289 295
290 void PrintSettings::SetOrientation(bool landscape) { 296 void PrintSettings::SetOrientation(bool landscape) {
291 if (landscape_ != landscape) { 297 if (landscape_ != landscape) {
292 landscape_ = landscape; 298 landscape_ = landscape;
293 page_setup_device_units_.FlipOrientation(); 299 page_setup_device_units_.FlipOrientation();
294 } 300 }
295 } 301 }
296 302
297 } // namespace printing 303 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698