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

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

Issue 566693002: Use file handles to interact with utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mon Sep 15 03:22:54 PDT 2014 Created 6 years, 3 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/browser/printing/pdf_to_emf_converter.h
diff --git a/chrome/browser/printing/pdf_to_emf_converter.h b/chrome/browser/printing/pdf_to_emf_converter.h
index ca7adc41bedfbdfb3501d0624f363873a920d9e0..b102e4f5e9e714732d9987b4a45585ce01d51bc7 100644
--- a/chrome/browser/printing/pdf_to_emf_converter.h
+++ b/chrome/browser/printing/pdf_to_emf_converter.h
@@ -7,7 +7,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/memory/scoped_vector.h"
+#include "base/memory/scoped_ptr.h"
namespace base {
class FilePath;
@@ -21,17 +21,20 @@ class PdfRenderSettings;
class PdfToEmfConverter {
public:
// Callback for when the PDF is converted to an EMF.
- // Takes ownership of metafiles.
- typedef base::Callback<void(double /*scale_factor*/,
- ScopedVector<MetafilePlayer>* /*emf_files*/)>
- ResultCallback;
+ typedef base::Callback<void(int page_number,
+ double scale_factor,
+ scoped_ptr<MetafilePlayer> emf)> PageCallback;
+ typedef base::Callback<void(int page_count)> PdfLoadedCallback;
+
virtual ~PdfToEmfConverter() {}
static scoped_ptr<PdfToEmfConverter> CreateDefault();
- virtual void Start(base::RefCountedMemory* data,
+ virtual void Start(const scoped_refptr<base::RefCountedMemory>& data,
const printing::PdfRenderSettings& conversion_settings,
- const ResultCallback& callback) = 0;
+ const PdfLoadedCallback& document_callback) = 0;
+
+ virtual void GetPage(int page_number, const PageCallback& page_callback) = 0;
};
} // namespace printing
« no previous file with comments | « no previous file | chrome/browser/printing/pdf_to_emf_converter.cc » ('j') | chrome/browser/printing/pdf_to_emf_converter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698