OLD | NEW |
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_vector.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 class PdfRenderSettings; | |
18 } | |
19 | |
20 namespace printing { | |
21 | 17 |
22 class Metafile; | 18 class MetafilePlayer; |
| 19 class PdfRenderSettings; |
23 | 20 |
24 class PdfToEmfConverter { | 21 class PdfToEmfConverter { |
25 public: | 22 public: |
26 // Callback for when the PDF is converted to an EMF. | 23 // Callback for when the PDF is converted to an EMF. |
27 // Takes ownership of metafiles. | 24 // Takes ownership of metafiles. |
28 typedef base::Callback< | 25 typedef base::Callback< |
29 void(double /*scale_factor*/, ScopedVector<Metafile>* /*emf_files*/)> | 26 void(double /*scale_factor*/, |
| 27 ScopedVector<MetafilePlayer>* /*emf_files*/)> |
30 ResultCallback; | 28 ResultCallback; |
31 virtual ~PdfToEmfConverter() {} | 29 virtual ~PdfToEmfConverter() {} |
32 | 30 |
33 static scoped_ptr<PdfToEmfConverter> CreateDefault(); | 31 static scoped_ptr<PdfToEmfConverter> CreateDefault(); |
34 | 32 |
35 virtual void Start(base::RefCountedMemory* data, | 33 virtual void Start(base::RefCountedMemory* data, |
36 const printing::PdfRenderSettings& conversion_settings, | 34 const printing::PdfRenderSettings& conversion_settings, |
37 const ResultCallback& callback) = 0; | 35 const ResultCallback& callback) = 0; |
38 }; | 36 }; |
39 | 37 |
40 } // namespace printing | 38 } // namespace printing |
41 | 39 |
42 #endif // CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_ | 40 #endif // CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_ |
OLD | NEW |