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

Side by Side Diff: printing/printing_context_mac.mm

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, 4 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_mac.h ('k') | printing/printing_context_no_system_dialog.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_mac.h" 5 #include "printing/printing_context_mac.h"
6 6
7 #import <ApplicationServices/ApplicationServices.h> 7 #import <ApplicationServices/ApplicationServices.h>
8 #import <AppKit/AppKit.h> 8 #import <AppKit/AppKit.h>
9 9
10 #import <iomanip> 10 #import <iomanip>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 DCHECK(!in_print_job_); 161 DCHECK(!in_print_job_);
162 162
163 print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]); 163 print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]);
164 settings_.set_ranges(GetPageRangesFromPrintInfo()); 164 settings_.set_ranges(GetPageRangesFromPrintInfo());
165 InitPrintSettingsFromPrintInfo(); 165 InitPrintSettingsFromPrintInfo();
166 166
167 return OK; 167 return OK;
168 } 168 }
169 169
170 PrintingContext::Result PrintingContextMac::UpdatePrinterSettings( 170 PrintingContext::Result PrintingContextMac::UpdatePrinterSettings(
171 bool external_preview) { 171 bool external_preview,
172 bool show_system_dialog) {
173 DCHECK(!show_system_dialog);
172 DCHECK(!in_print_job_); 174 DCHECK(!in_print_job_);
173 175
174 // NOTE: Reset |print_info_| with a copy of |sharedPrintInfo| so as to start 176 // NOTE: Reset |print_info_| with a copy of |sharedPrintInfo| so as to start
175 // with a clean slate. 177 // with a clean slate.
176 print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]); 178 print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]);
177 179
178 if (external_preview) { 180 if (external_preview) {
179 if (!SetPrintPreviewJob()) 181 if (!SetPrintPreviewJob())
180 return OnError(); 182 return OnError();
181 } else { 183 } else {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 void PrintingContextMac::ReleaseContext() { 518 void PrintingContextMac::ReleaseContext() {
517 print_info_.reset(); 519 print_info_.reset();
518 context_ = NULL; 520 context_ = NULL;
519 } 521 }
520 522
521 gfx::NativeDrawingContext PrintingContextMac::context() const { 523 gfx::NativeDrawingContext PrintingContextMac::context() const {
522 return context_; 524 return context_;
523 } 525 }
524 526
525 } // namespace printing 527 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context_mac.h ('k') | printing/printing_context_no_system_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698