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_cairo.h" | 5 #include "printing/printing_context_cairo.h" |
6 | 6 |
7 // TODO(abodenha@chromium.org) The number of #ifdefs here has gotten too | 7 // TODO(abodenha@chromium.org) The number of #ifdefs here has gotten too |
8 // large. Refactor this code into separate files for Linux and Chrome OS. | 8 // large. Refactor this code into separate files for Linux and Chrome OS. |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 if (!job_settings.GetBoolean(kSettingLandscape, &landscape)) | 148 if (!job_settings.GetBoolean(kSettingLandscape, &landscape)) |
149 return OnError(); | 149 return OnError(); |
150 | 150 |
151 settings_.SetOrientation(landscape); | 151 settings_.SetOrientation(landscape); |
152 settings_.ranges = ranges; | 152 settings_.ranges = ranges; |
153 | 153 |
154 return OK; | 154 return OK; |
155 #else | 155 #else |
156 DCHECK(!in_print_job_); | 156 DCHECK(!in_print_job_); |
157 | 157 |
158 if (!print_dialog_->UpdateSettings(job_settings, ranges)) | 158 DictionaryValue header_footer_info; |
| 159 GetHeaderFooterInfo(job_settings, &header_footer_info); |
| 160 |
| 161 if (!print_dialog_->UpdateSettings(job_settings, ranges, header_footer_info)) |
159 return OnError(); | 162 return OnError(); |
160 | 163 |
161 return OK; | 164 return OK; |
162 #endif | 165 #endif |
163 } | 166 } |
164 | 167 |
165 PrintingContext::Result PrintingContextCairo::InitWithSettings( | 168 PrintingContext::Result PrintingContextCairo::InitWithSettings( |
166 const PrintSettings& settings) { | 169 const PrintSettings& settings) { |
167 DCHECK(!in_print_job_); | 170 DCHECK(!in_print_job_); |
168 | 171 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 void PrintingContextCairo::ReleaseContext() { | 223 void PrintingContextCairo::ReleaseContext() { |
221 // Intentional No-op. | 224 // Intentional No-op. |
222 } | 225 } |
223 | 226 |
224 gfx::NativeDrawingContext PrintingContextCairo::context() const { | 227 gfx::NativeDrawingContext PrintingContextCairo::context() const { |
225 // Intentional No-op. | 228 // Intentional No-op. |
226 return NULL; | 229 return NULL; |
227 } | 230 } |
228 | 231 |
229 } // namespace printing | 232 } // namespace printing |
OLD | NEW |