| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/service/cloud_print/print_system.h" | 5 #include "chrome/service/cloud_print/print_system.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 DCHECK(CurrentlyOnServiceIOThread()); | 438 DCHECK(CurrentlyOnServiceIOThread()); |
| 439 std::unique_ptr<ServiceUtilityProcessHost> utility_host( | 439 std::unique_ptr<ServiceUtilityProcessHost> utility_host( |
| 440 new ServiceUtilityProcessHost(this, client_task_runner.get())); | 440 new ServiceUtilityProcessHost(this, client_task_runner.get())); |
| 441 // TODO(gene): For now we disabling autorotation for CloudPrinting. | 441 // TODO(gene): For now we disabling autorotation for CloudPrinting. |
| 442 // Landscape/Portrait setting is passed in the print ticket and | 442 // Landscape/Portrait setting is passed in the print ticket and |
| 443 // server is generating portrait PDF always. | 443 // server is generating portrait PDF always. |
| 444 // We should enable autorotation once server will be able to generate | 444 // We should enable autorotation once server will be able to generate |
| 445 // PDF that matches paper size and orientation. | 445 // PDF that matches paper size and orientation. |
| 446 if (utility_host->StartRenderPDFPagesToMetafile( | 446 if (utility_host->StartRenderPDFPagesToMetafile( |
| 447 pdf_path, | 447 pdf_path, |
| 448 printing::PdfRenderSettings(render_area, render_dpi, false))) { | 448 printing::PdfRenderSettings( |
| 449 render_area, render_dpi, false, |
| 450 printing::PdfRenderSettings::Mode::NORMAL))) { |
| 449 // The object will self-destruct when the child process dies. | 451 // The object will self-destruct when the child process dies. |
| 450 ignore_result(utility_host.release()); | 452 ignore_result(utility_host.release()); |
| 451 } else { | 453 } else { |
| 452 client_task_runner->PostTask( | 454 client_task_runner->PostTask( |
| 453 FROM_HERE, base::Bind(&Core::PrintJobDone, this, false)); | 455 FROM_HERE, base::Bind(&Core::PrintJobDone, this, false)); |
| 454 } | 456 } |
| 455 } | 457 } |
| 456 | 458 |
| 457 bool PrintXPSDocument(const std::string& printer_name, | 459 bool PrintXPSDocument(const std::string& printer_name, |
| 458 const std::string& job_title, | 460 const std::string& job_title, |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 } | 834 } |
| 833 | 835 |
| 834 } // namespace | 836 } // namespace |
| 835 | 837 |
| 836 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( | 838 scoped_refptr<PrintSystem> PrintSystem::CreateInstance( |
| 837 const base::DictionaryValue* print_system_settings) { | 839 const base::DictionaryValue* print_system_settings) { |
| 838 return new PrintSystemWin; | 840 return new PrintSystemWin; |
| 839 } | 841 } |
| 840 | 842 |
| 841 } // namespace cloud_print | 843 } // namespace cloud_print |
| OLD | NEW |