| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 color_mode != HP_COLOR_BLACK); | 118 color_mode != HP_COLOR_BLACK); |
| 119 } | 119 } |
| 120 | 120 |
| 121 // Global SequenceNumber used for generating unique cookie values. | 121 // Global SequenceNumber used for generating unique cookie values. |
| 122 static base::StaticAtomicSequenceNumber cookie_seq; | 122 static base::StaticAtomicSequenceNumber cookie_seq; |
| 123 | 123 |
| 124 PrintSettings::PrintSettings() { | 124 PrintSettings::PrintSettings() { |
| 125 Clear(); | 125 Clear(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 PrintSettings::PrintSettings(const PrintSettings& other) = default; |
| 129 |
| 128 PrintSettings::~PrintSettings() { | 130 PrintSettings::~PrintSettings() { |
| 129 } | 131 } |
| 130 | 132 |
| 131 void PrintSettings::Clear() { | 133 void PrintSettings::Clear() { |
| 132 ranges_.clear(); | 134 ranges_.clear(); |
| 133 margin_type_ = DEFAULT_MARGINS; | 135 margin_type_ = DEFAULT_MARGINS; |
| 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(); |
| (...skipping 97 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 |