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

Unified Diff: chrome/service/cloud_print/print_system_win.cc

Issue 2812263002: clean up printing::Image and printing::Metafile (Closed)
Patch Set: definition matches declaration Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/service/cloud_print/print_system_win.cc
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index 7d803c3cf6ec8d0181f4d9da14f5ea7522863990..292aa689014e3e4616a7ede2b5ebd4c2ba52610c 100644
--- a/chrome/service/cloud_print/print_system_win.cc
+++ b/chrome/service/cloud_print/print_system_win.cc
@@ -339,13 +339,17 @@ class JobSpoolerWin : public PrintSystem::JobSpooler {
}
// ServiceUtilityProcessHost::Client implementation.
- void OnRenderPDFPagesToMetafilePageDone(
- float scale_factor,
- const printing::MetafilePlayer& emf) override {
+ bool OnRenderPDFPagesToMetafilePageDone(const std::vector<char>& emf_data,
+ float scale_factor) override {
+ printing::Emf emf;
+ if (!emf.InitFromData(emf_data.data(), emf_data.size())) {
+ return false;
+ }
PreparePageDCForPrinting(printer_dc_.Get(), scale_factor);
::StartPage(printer_dc_.Get());
emf.SafePlayback(printer_dc_.Get());
::EndPage(printer_dc_.Get());
+ return true;
}
// ServiceUtilityProcessHost::Client implementation.
« no previous file with comments | « chrome/browser/printing/printing_layout_browsertest.cc ('k') | chrome/service/service_utility_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698