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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 if (!print_dialog_) { | 133 if (!print_dialog_) { |
134 print_dialog_ = create_dialog_func_(this); | 134 print_dialog_ = create_dialog_func_(this); |
135 print_dialog_->AddRefToDialog(); | 135 print_dialog_->AddRefToDialog(); |
136 } | 136 } |
137 print_dialog_->UseDefaultSettings(); | 137 print_dialog_->UseDefaultSettings(); |
138 #endif // defined(OS_CHROMEOS) | 138 #endif // defined(OS_CHROMEOS) |
139 | 139 |
140 return OK; | 140 return OK; |
141 } | 141 } |
142 | 142 |
143 PrintingContext::Result PrintingContextCairo::UpdatePrintSettings( | 143 PrintingContext::Result PrintingContextCairo::UpdatePrinterSettings( |
144 const DictionaryValue& job_settings, const PageRanges& ranges) { | 144 const DictionaryValue& job_settings, const PageRanges& ranges) { |
145 #if defined(OS_CHROMEOS) | 145 #if defined(OS_CHROMEOS) |
146 bool landscape = false; | 146 bool landscape = false; |
147 | 147 |
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 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 void PrintingContextCairo::ReleaseContext() { | 220 void PrintingContextCairo::ReleaseContext() { |
221 // Intentional No-op. | 221 // Intentional No-op. |
222 } | 222 } |
223 | 223 |
224 gfx::NativeDrawingContext PrintingContextCairo::context() const { | 224 gfx::NativeDrawingContext PrintingContextCairo::context() const { |
225 // Intentional No-op. | 225 // Intentional No-op. |
226 return NULL; | 226 return NULL; |
227 } | 227 } |
228 | 228 |
229 } // namespace printing | 229 } // namespace printing |
OLD | NEW |