Chromium Code Reviews| 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); |