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

Side by Side Diff: printing/printing_context_no_system_dialog.cc

Issue 480303002: Use document from preview for System Dialog printing on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue Aug 26 01:11:31 PDT 2014 Created 6 years, 3 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/printing_context_no_system_dialog.h ('k') | printing/printing_context_win.h » ('j') | 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Convert this to pixels based on the dpi. 68 // Convert this to pixels based on the dpi.
69 float multiplier = 100 * settings_.device_units_per_inch(); 69 float multiplier = 100 * settings_.device_units_per_inch();
70 multiplier /= kHundrethsMMPerInch; 70 multiplier /= kHundrethsMMPerInch;
71 width *= multiplier; 71 width *= multiplier;
72 height *= multiplier; 72 height *= multiplier;
73 } 73 }
74 return gfx::Size(width, height); 74 return gfx::Size(width, height);
75 } 75 }
76 76
77 PrintingContext::Result PrintingContextNoSystemDialog::UpdatePrinterSettings( 77 PrintingContext::Result PrintingContextNoSystemDialog::UpdatePrinterSettings(
78 bool external_preview) { 78 bool external_preview,
79 bool show_system_dialog) {
80 DCHECK(!show_system_dialog);
79 81
80 if (settings_.dpi() == 0) 82 if (settings_.dpi() == 0)
81 UseDefaultSettings(); 83 UseDefaultSettings();
82 84
83 return OK; 85 return OK;
84 } 86 }
85 87
86 PrintingContext::Result PrintingContextNoSystemDialog::InitWithSettings( 88 PrintingContext::Result PrintingContextNoSystemDialog::InitWithSettings(
87 const PrintSettings& settings) { 89 const PrintSettings& settings) {
88 DCHECK(!in_print_job_); 90 DCHECK(!in_print_job_);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Intentional No-op. 140 // Intentional No-op.
139 } 141 }
140 142
141 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const { 143 gfx::NativeDrawingContext PrintingContextNoSystemDialog::context() const {
142 // Intentional No-op. 144 // Intentional No-op.
143 return NULL; 145 return NULL;
144 } 146 }
145 147
146 } // namespace printing 148 } // namespace printing
147 149
OLDNEW
« no previous file with comments | « printing/printing_context_no_system_dialog.h ('k') | printing/printing_context_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698