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

Side by Side Diff: printing/printing_context_no_system_dialog.cc

Issue 54273002: Revert piece of "De-duplicate job_settings parsing code." r231501 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/printing_context.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_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
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
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
OLDNEW
« no previous file with comments | « printing/printing_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698