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

Unified Diff: chrome/service/service_utility_process_host.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
« no previous file with comments | « chrome/service/service_utility_process_host.h ('k') | components/printing/test/mock_printer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7a9edf70f2959693b0c869fe94831dcc426dfdfa..92f92e4c56ec91f8955a3e5b3adc8211444ac064 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -37,7 +37,6 @@
#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"
@@ -429,6 +428,12 @@ void ServiceUtilityProcessHost::OnGetPrinterSemanticCapsAndDefaultsFailed(
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);
@@ -442,11 +447,9 @@ bool ServiceUtilityProcessHost::Client::MetafileAvailable(float scale_factor,
OnRenderPDFPagesToMetafileDone(false);
return false;
}
- printing::Emf emf;
- if (!emf.InitFromData(data.data(), data.size())) {
+ if (!OnRenderPDFPagesToMetafilePageDone(data, scale_factor)) {
OnRenderPDFPagesToMetafileDone(false);
return false;
}
- OnRenderPDFPagesToMetafilePageDone(scale_factor, emf);
return true;
}
« no previous file with comments | « chrome/service/service_utility_process_host.h ('k') | components/printing/test/mock_printer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698