| 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 <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 if (!debug_dump_path.empty()) { | 250 if (!debug_dump_path.empty()) { |
| 251 BrowserThread::PostTask( | 251 BrowserThread::PostTask( |
| 252 BrowserThread::FILE, | 252 BrowserThread::FILE, |
| 253 FROM_HERE, | 253 FROM_HERE, |
| 254 base::Bind(&WriteBytesOnFileThread, debug_dump_path, bytes)); | 254 base::Bind(&WriteBytesOnFileThread, debug_dump_path, bytes)); |
| 255 } | 255 } |
| 256 | 256 |
| 257 if (!pdf_to_emf_converter_) | 257 if (!pdf_to_emf_converter_) |
| 258 pdf_to_emf_converter_ = PdfToEmfConverter::CreateDefault(); | 258 pdf_to_emf_converter_ = PdfToEmfConverter::CreateDefault(); |
| 259 | 259 |
| 260 const int kPrinterDpi = 600; | 260 const int kPrinterDpi = print_job_->settings().dpi(); |
| 261 pdf_to_emf_converter_->Start( | 261 pdf_to_emf_converter_->Start( |
| 262 bytes, | 262 bytes, |
| 263 printing::PdfRenderSettings(params.content_area, kPrinterDpi, false), | 263 printing::PdfRenderSettings(params.content_area, kPrinterDpi, false), |
| 264 base::Bind(&PrintViewManagerBase::OnPdfToEmfConverted, | 264 base::Bind(&PrintViewManagerBase::OnPdfToEmfConverted, |
| 265 base::Unretained(this), | 265 base::Unretained(this), |
| 266 params)); | 266 params)); |
| 267 } | 267 } |
| 268 #endif // !WIN_PDF_METAFILE_FOR_PRINTING | 268 #endif // !WIN_PDF_METAFILE_FOR_PRINTING |
| 269 } | 269 } |
| 270 | 270 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 scoped_refptr<printing::PrinterQuery> printer_query; | 610 scoped_refptr<printing::PrinterQuery> printer_query; |
| 611 printer_query = queue_->PopPrinterQuery(cookie); | 611 printer_query = queue_->PopPrinterQuery(cookie); |
| 612 if (!printer_query) | 612 if (!printer_query) |
| 613 return; | 613 return; |
| 614 BrowserThread::PostTask( | 614 BrowserThread::PostTask( |
| 615 BrowserThread::IO, FROM_HERE, | 615 BrowserThread::IO, FROM_HERE, |
| 616 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); | 616 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); |
| 617 } | 617 } |
| 618 | 618 |
| 619 } // namespace printing | 619 } // namespace printing |
| OLD | NEW |