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

Side by Side Diff: printing/printing_context_system_dialog_win.cc

Issue 2714073002: Eliminate PS printing edge cases (Closed)
Patch Set: Fix compile errors Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_system_dialog_win.h" 5 #include "printing/printing_context_system_dialog_win.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "printing/backend/win_helper.h" 10 #include "printing/backend/win_helper.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 range.from = ranges[i].nFromPage - 1; 128 range.from = ranges[i].nFromPage - 1;
129 range.to = ranges[i].nToPage - 1; 129 range.to = ranges[i].nToPage - 1;
130 ranges_vector.push_back(range); 130 ranges_vector.push_back(range);
131 } 131 }
132 } 132 }
133 133
134 settings_.set_ranges(ranges_vector); 134 settings_.set_ranges(ranges_vector);
135 settings_.set_device_name(new_device_name); 135 settings_.set_device_name(new_device_name);
136 settings_.set_selection_only(selection_only); 136 settings_.set_selection_only(selection_only);
137 PrintSettingsInitializerWin::InitPrintSettings( 137 PrintSettingsInitializerWin::InitPrintSettings(
138 context(), dev_mode, &settings_); 138 context(), dev_mode, &settings_, postscript_enabled());
139 139
140 return true; 140 return true;
141 } 141 }
142 142
143 PrintingContext::Result PrintingContextSystemDialogWin::ParseDialogResultEx( 143 PrintingContext::Result PrintingContextSystemDialogWin::ParseDialogResultEx(
144 const PRINTDLGEX& dialog_options) { 144 const PRINTDLGEX& dialog_options) {
145 // If the user clicked OK or Apply then Cancel, but not only Cancel. 145 // If the user clicked OK or Apply then Cancel, but not only Cancel.
146 if (dialog_options.dwResultAction != PD_RESULT_CANCEL) { 146 if (dialog_options.dwResultAction != PD_RESULT_CANCEL) {
147 // Start fresh, but preserve GDI print setting. 147 // Start fresh, but preserve GDI print setting.
148 bool print_text_with_gdi = settings_.print_text_with_gdi(); 148 bool print_text_with_gdi = settings_.print_text_with_gdi();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 case PD_RESULT_APPLY: 211 case PD_RESULT_APPLY:
212 return context() ? CANCEL : FAILED; 212 return context() ? CANCEL : FAILED;
213 case PD_RESULT_CANCEL: 213 case PD_RESULT_CANCEL:
214 return CANCEL; 214 return CANCEL;
215 default: 215 default:
216 return FAILED; 216 return FAILED;
217 } 217 }
218 } 218 }
219 219
220 } // namespace printing 220 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698