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

Unified Diff: chrome/browser/printing/pdf_to_emf_converter.cc

Issue 2117713002: Print directly to CUPS using the IPP APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ippRead
Patch Set: lint Created 4 years, 5 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 | « no previous file | printing/BUILD.gn » ('j') | printing/backend/cups_ipp_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/pdf_to_emf_converter.cc
diff --git a/chrome/browser/printing/pdf_to_emf_converter.cc b/chrome/browser/printing/pdf_to_emf_converter.cc
index fed753aec6d525d7f8eaf1d95a27325708c6d478..b687bb642b4de6f34c97b246b830c08776cd49b3 100644
--- a/chrome/browser/printing/pdf_to_emf_converter.cc
+++ b/chrome/browser/printing/pdf_to_emf_converter.cc
@@ -9,6 +9,7 @@
#include <memory>
#include <queue>
#include <utility>
+#include <vector>
#include "base/files/file.h"
#include "base/files/file_util.h"
@@ -72,6 +73,7 @@ class LazyEmf : public MetafilePlayer {
~LazyEmf() override { Close(); }
bool SafePlayback(HDC hdc) const override;
+ bool GetDataAsVector(std::vector<char>* buffer) const override;
bool SaveTo(base::File* file) const override;
private:
@@ -258,6 +260,11 @@ bool LazyEmf::SafePlayback(HDC hdc) const {
return result;
}
+bool LazyEmf::GetDataAsVector(std::vector<char>* buffer) const {
Lei Zhang 2016/07/25 21:06:04 Thanks for implemeting this... but will this ever
skau 2016/07/27 00:16:47 It's not currently called. NOTREACHED() probably
+ Emf emf;
+ return LoadEmf(&emf) && emf.GetDataAsVector(buffer);
+}
+
bool LazyEmf::SaveTo(base::File* file) const {
Emf emf;
return LoadEmf(&emf) && emf.SaveTo(file);
« no previous file with comments | « no previous file | printing/BUILD.gn » ('j') | printing/backend/cups_ipp_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698