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

Side by Side Diff: chrome/browser/printing/print_view_manager_base.cc

Issue 2392343003: Fix printing with XPS printers on Windows. (Closed)
Patch Set: memset, buffer size Created 4 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
« no previous file with comments | « no previous file | printing/print_settings.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/printing/print_view_manager_base.h" 5 #include "chrome/browser/printing/print_view_manager_base.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 web_contents()->Stop(); 187 web_contents()->Stop();
188 return; 188 return;
189 } 189 }
190 } 190 }
191 191
192 #if defined(OS_WIN) 192 #if defined(OS_WIN)
193 print_job_->AppendPrintedPage(params.page_number); 193 print_job_->AppendPrintedPage(params.page_number);
194 if (metafile_must_be_valid) { 194 if (metafile_must_be_valid) {
195 bool print_text_with_gdi = 195 bool print_text_with_gdi =
196 document->settings().print_text_with_gdi() && 196 document->settings().print_text_with_gdi() &&
197 !document->settings().printer_is_xps() &&
197 !base::CommandLine::ForCurrentProcess()->HasSwitch( 198 !base::CommandLine::ForCurrentProcess()->HasSwitch(
198 switches::kDisableGDITextPrinting); 199 switches::kDisableGDITextPrinting);
199 scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes( 200 scoped_refptr<base::RefCountedBytes> bytes = new base::RefCountedBytes(
200 reinterpret_cast<const unsigned char*>(shared_buf->memory()), 201 reinterpret_cast<const unsigned char*>(shared_buf->memory()),
201 params.data_size); 202 params.data_size);
202 203
203 document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf")); 204 document->DebugDumpData(bytes.get(), FILE_PATH_LITERAL(".pdf"));
204 print_job_->StartPdfToEmfConversion( 205 print_job_->StartPdfToEmfConversion(
205 bytes, params.page_size, params.content_area, print_text_with_gdi); 206 bytes, params.page_size, params.content_area, print_text_with_gdi);
206 } 207 }
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 scoped_refptr<PrinterQuery> printer_query; 535 scoped_refptr<PrinterQuery> printer_query;
535 printer_query = queue_->PopPrinterQuery(cookie); 536 printer_query = queue_->PopPrinterQuery(cookie);
536 if (!printer_query.get()) 537 if (!printer_query.get())
537 return; 538 return;
538 BrowserThread::PostTask( 539 BrowserThread::PostTask(
539 BrowserThread::IO, FROM_HERE, 540 BrowserThread::IO, FROM_HERE,
540 base::Bind(&PrinterQuery::StopWorker, printer_query)); 541 base::Bind(&PrinterQuery::StopWorker, printer_query));
541 } 542 }
542 543
543 } // namespace printing 544 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | printing/print_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698