| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |