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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 PrintSettings::PrintSettings() { | 124 PrintSettings::PrintSettings() { |
125 Clear(); | 125 Clear(); |
126 } | 126 } |
127 | 127 |
128 PrintSettings::~PrintSettings() { | 128 PrintSettings::~PrintSettings() { |
129 } | 129 } |
130 | 130 |
131 void PrintSettings::Clear() { | 131 void PrintSettings::Clear() { |
132 ranges_.clear(); | 132 ranges_.clear(); |
133 margin_type_ = DEFAULT_MARGINS; | 133 margin_type_ = DEFAULT_MARGINS; |
| 134 min_shrink_ = 1.25; |
| 135 max_shrink_ = 2.; |
134 desired_dpi_ = 72; | 136 desired_dpi_ = 72; |
135 selection_only_ = false; | 137 selection_only_ = false; |
136 title_ = base::string16(); | 138 title_ = base::string16(); |
137 url_ = base::string16(); | 139 url_ = base::string16(); |
138 display_header_footer_ = false; | 140 display_header_footer_ = false; |
139 device_name_.clear(); | 141 device_name_.clear(); |
140 requested_media_ = RequestedMedia(); | 142 requested_media_ = RequestedMedia(); |
141 page_setup_device_units_.Clear(); | 143 page_setup_device_units_.Clear(); |
142 dpi_ = 0; | 144 dpi_ = 0; |
143 landscape_ = false; | 145 landscape_ = false; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 237 } |
236 | 238 |
237 void PrintSettings::SetOrientation(bool landscape) { | 239 void PrintSettings::SetOrientation(bool landscape) { |
238 if (landscape_ != landscape) { | 240 if (landscape_ != landscape) { |
239 landscape_ = landscape; | 241 landscape_ = landscape; |
240 page_setup_device_units_.FlipOrientation(); | 242 page_setup_device_units_.FlipOrientation(); |
241 } | 243 } |
242 } | 244 } |
243 | 245 |
244 } // namespace printing | 246 } // namespace printing |
OLD | NEW |