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/printing_context_no_system_dialog.h" | 5 #include "printing/printing_context_no_system_dialog.h" |
6 | 6 |
7 #include <unicode/ulocdata.h> | 7 #include <unicode/ulocdata.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 settings_.SetPrinterPrintableArea(physical_size_device_units, | 74 settings_.SetPrinterPrintableArea(physical_size_device_units, |
75 printable_area_device_units, | 75 printable_area_device_units, |
76 dpi, true); | 76 dpi, true); |
77 | 77 |
78 return OK; | 78 return OK; |
79 } | 79 } |
80 | 80 |
81 PrintingContext::Result PrintingContextNoSystemDialog::UpdatePrinterSettings( | 81 PrintingContext::Result PrintingContextNoSystemDialog::UpdatePrinterSettings( |
82 bool target_is_pdf, | 82 bool target_is_pdf, |
83 bool external_preview) { | 83 bool external_preview) { |
| 84 |
| 85 if (settings_.dpi() == 0) |
| 86 UseDefaultSettings(); |
| 87 |
84 return OK; | 88 return OK; |
85 } | 89 } |
86 | 90 |
87 PrintingContext::Result PrintingContextNoSystemDialog::InitWithSettings( | 91 PrintingContext::Result PrintingContextNoSystemDialog::InitWithSettings( |
88 const PrintSettings& settings) { | 92 const PrintSettings& settings) { |
89 DCHECK(!in_print_job_); | 93 DCHECK(!in_print_job_); |
90 | 94 |
91 settings_ = settings; | 95 settings_ = settings; |
92 | 96 |
93 return OK; | 97 return OK; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // Intentional No-op. | 143 // Intentional No-op. |
140 } | 144 } |
141 | 145 |
142 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { | 146 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { |
143 // Intentional No-op. | 147 // Intentional No-op. |
144 return NULL; | 148 return NULL; |
145 } | 149 } |
146 | 150 |
147 } // namespace printing | 151 } // namespace printing |
148 | 152 |
OLD | NEW |