| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 8 #include "base/logging.h" |
| 9 #include "printing/print_job_constants.h" | 9 #include "printing/print_job_constants.h" |
| 10 #include "printing/units.h" | 10 #include "printing/units.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 bool isColorModelSelected(int model) { | 101 bool isColorModelSelected(int model) { |
| 102 return (model != GRAY && | 102 return (model != GRAY && |
| 103 model != BLACK && | 103 model != BLACK && |
| 104 model != PRINTOUTMODE_NORMAL_GRAY && | 104 model != PRINTOUTMODE_NORMAL_GRAY && |
| 105 model != COLORMODE_MONOCHROME && | 105 model != COLORMODE_MONOCHROME && |
| 106 model != PROCESSCOLORMODEL_GREYSCALE && | 106 model != PROCESSCOLORMODEL_GREYSCALE && |
| 107 model != HP_COLOR_BLACK); | 107 model != HP_COLOR_BLACK); |
| 108 } | 108 } |
| 109 | 109 |
| 110 // Global SequenceNumber used for generating unique cookie values. | 110 // Global SequenceNumber used for generating unique cookie values. |
| 111 static base::AtomicSequenceNumber cookie_seq(base::LINKER_INITIALIZED); | 111 static base::StaticAtomicSequenceNumber cookie_seq; |
| 112 | 112 |
| 113 PrintSettings::PrintSettings() | 113 PrintSettings::PrintSettings() |
| 114 : min_shrink(1.25), | 114 : min_shrink(1.25), |
| 115 max_shrink(2.0), | 115 max_shrink(2.0), |
| 116 desired_dpi(72), | 116 desired_dpi(72), |
| 117 selection_only(false), | 117 selection_only(false), |
| 118 margin_type(DEFAULT_MARGINS), | 118 margin_type(DEFAULT_MARGINS), |
| 119 display_header_footer(false), | 119 display_header_footer(false), |
| 120 dpi_(0), | 120 dpi_(0), |
| 121 landscape_(false), | 121 landscape_(false), |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 240 } |
| 241 | 241 |
| 242 void PrintSettings::SetOrientation(bool landscape) { | 242 void PrintSettings::SetOrientation(bool landscape) { |
| 243 if (landscape_ != landscape) { | 243 if (landscape_ != landscape) { |
| 244 landscape_ = landscape; | 244 landscape_ = landscape; |
| 245 page_setup_device_units_.FlipOrientation(); | 245 page_setup_device_units_.FlipOrientation(); |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace printing | 249 } // namespace printing |
| OLD | NEW |