Index: chrome/service/service_utility_process_host.cc |
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc |
index 92f92e4c56ec91f8955a3e5b3adc8211444ac064..7a9edf70f2959693b0c869fe94831dcc426dfdfa 100644 |
--- a/chrome/service/service_utility_process_host.cc |
+++ b/chrome/service/service_utility_process_host.cc |
@@ -37,6 +37,7 @@ |
#include "mojo/edk/embedder/named_platform_channel_pair.h" |
#include "mojo/edk/embedder/platform_channel_pair.h" |
#include "mojo/edk/embedder/scoped_platform_handle.h" |
+#include "printing/emf_win.h" |
#include "sandbox/win/src/sandbox_policy.h" |
#include "sandbox/win/src/sandbox_types.h" |
#include "ui/base/ui_base_switches.h" |
@@ -428,12 +429,6 @@ |
printing::PrinterSemanticCapsAndDefaults())); |
} |
-bool ServiceUtilityProcessHost::Client::OnRenderPDFPagesToMetafilePageDone( |
- const std::vector<char>&, |
- float) { |
- return false; |
-} |
- |
bool ServiceUtilityProcessHost::Client::MetafileAvailable(float scale_factor, |
base::File file) { |
file.Seek(base::File::FROM_BEGIN, 0); |
@@ -447,9 +442,11 @@ |
OnRenderPDFPagesToMetafileDone(false); |
return false; |
} |
- if (!OnRenderPDFPagesToMetafilePageDone(data, scale_factor)) { |
+ printing::Emf emf; |
+ if (!emf.InitFromData(data.data(), data.size())) { |
OnRenderPDFPagesToMetafileDone(false); |
return false; |
} |
+ OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); |
return true; |
} |