Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: printing/printing_context_cairo.cc

Issue 7831041: Fix print preview workflow to reflect settings of selected printer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update per code review Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/print_settings_initializer_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_) {
159 print_dialog_ = create_dialog_func_(this);
160 print_dialog_->AddRefToDialog();
161 }
162
158 if (!print_dialog_->UpdateSettings(job_settings, ranges)) 163 if (!print_dialog_->UpdateSettings(job_settings, ranges))
159 return OnError(); 164 return OnError();
160 165
161 return OK; 166 return OK;
162 #endif 167 #endif
163 } 168 }
164 169
165 PrintingContext::Result PrintingContextCairo::InitWithSettings( 170 PrintingContext::Result PrintingContextCairo::InitWithSettings(
166 const PrintSettings& settings) { 171 const PrintSettings& settings) {
167 DCHECK(!in_print_job_); 172 DCHECK(!in_print_job_);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void PrintingContextCairo::ReleaseContext() { 225 void PrintingContextCairo::ReleaseContext() {
221 // Intentional No-op. 226 // Intentional No-op.
222 } 227 }
223 228
224 gfx::NativeDrawingContext PrintingContextCairo::context() const { 229 gfx::NativeDrawingContext PrintingContextCairo::context() const {
225 // Intentional No-op. 230 // Intentional No-op.
226 return NULL; 231 return NULL;
227 } 232 }
228 233
229 } // namespace printing 234 } // namespace printing
OLDNEW
« no previous file with comments | « printing/print_settings_initializer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698