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

Side by Side Diff: chrome/service/cloud_print/print_system_win.cc

Issue 2640033005: Substitute boolean GDI printing for a mode type (Closed)
Patch Set: Fix nits Created 3 years, 10 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/common/chrome_utility_printing_messages.h ('k') | chrome/service/service_utility_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698