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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
6 #define CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_ 6 #define CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_ptr.h"
11 11
12 namespace base { 12 namespace base {
13 class FilePath; 13 class FilePath;
14 } 14 }
15 15
16 namespace printing { 16 namespace printing {
17 17
18 class MetafilePlayer; 18 class MetafilePlayer;
19 class PdfRenderSettings; 19 class PdfRenderSettings;
20 20
21 class PdfToEmfConverter { 21 class PdfToEmfConverter {
22 public: 22 public:
23 // Callback for when the PDF is converted to an EMF. 23 typedef base::Callback<void(int page_count)> StartCallback;
24 // Takes ownership of metafiles. 24 typedef base::Callback<void(int page_number,
25 typedef base::Callback<void(double /*scale_factor*/, 25 double scale_factor,
26 ScopedVector<MetafilePlayer>* /*emf_files*/)> 26 scoped_ptr<MetafilePlayer> emf)> GetPageCallback;
27 ResultCallback; 27
28 virtual ~PdfToEmfConverter() {} 28 virtual ~PdfToEmfConverter();
29 29
30 static scoped_ptr<PdfToEmfConverter> CreateDefault(); 30 static scoped_ptr<PdfToEmfConverter> CreateDefault();
31 31
32 virtual void Start(base::RefCountedMemory* data, 32 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.
33 const printing::PdfRenderSettings& conversion_settings, 33 const PdfRenderSettings& conversion_settings,
34 const ResultCallback& callback) = 0; 34 const StartCallback& start_callback) = 0;
35
36 virtual void GetPage(int page_number,
37 const GetPageCallback& get_page_callback) = 0;
35 }; 38 };
36 39
37 } // namespace printing 40 } // namespace printing
38 41
39 #endif // CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_ 42 #endif // CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_
OLDNEW
« 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