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

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 18:19:41 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..902618ebfddbe4d072ac0f19fbbf4fa22067e4e9 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;
@@ -20,18 +20,21 @@ 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;
- virtual ~PdfToEmfConverter() {}
+ typedef base::Callback<void(int page_count)> StartCallback;
+ typedef base::Callback<void(int page_number,
+ double scale_factor,
+ scoped_ptr<MetafilePlayer> emf)> GetPageCallback;
+
+ virtual ~PdfToEmfConverter();
static scoped_ptr<PdfToEmfConverter> CreateDefault();
- virtual void Start(base::RefCountedMemory* data,
- const printing::PdfRenderSettings& conversion_settings,
- const ResultCallback& callback) = 0;
+ virtual void Start(const scoped_refptr<base::RefCountedMemory>& data,
Lei Zhang 2014/09/16 03:36:54 nit: document the abstract methods.
Vitaly Buka (NO REVIEWS) 2014/09/16 07:50:36 Done.
+ const PdfRenderSettings& conversion_settings,
+ const StartCallback& start_callback) = 0;
+
+ virtual void GetPage(int page_number,
+ const GetPageCallback& get_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