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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 GetPageCallback; | 28 GetPageCallback; |
29 | 29 |
30 virtual ~PdfToEmfConverter(); | 30 virtual ~PdfToEmfConverter(); |
31 | 31 |
32 static std::unique_ptr<PdfToEmfConverter> CreateDefault(); | 32 static std::unique_ptr<PdfToEmfConverter> CreateDefault(); |
33 | 33 |
34 // Starts conversion of PDF provided as |data|. Calls |start_callback| | 34 // Starts conversion of PDF provided as |data|. Calls |start_callback| |
35 // with positive |page_count|. |page_count| is 0 if initialization failed. | 35 // with positive |page_count|. |page_count| is 0 if initialization failed. |
36 virtual void Start(const scoped_refptr<base::RefCountedMemory>& data, | 36 virtual void Start(const scoped_refptr<base::RefCountedMemory>& data, |
37 const PdfRenderSettings& conversion_settings, | 37 const PdfRenderSettings& conversion_settings, |
| 38 bool print_text_with_gdi, |
38 const StartCallback& start_callback) = 0; | 39 const StartCallback& start_callback) = 0; |
39 | 40 |
40 // Requests conversion of the page. |page_number| is 0-base page number in | 41 // Requests conversion of the page. |page_number| is 0-base page number in |
41 // PDF provided in Start() call. | 42 // PDF provided in Start() call. |
42 // Calls |get_page_callback| after conversion. |emf| of callback in not NULL | 43 // Calls |get_page_callback| after conversion. |emf| of callback in not NULL |
43 // if conversion succeeded. | 44 // if conversion succeeded. |
44 virtual void GetPage(int page_number, | 45 virtual void GetPage(int page_number, |
45 const GetPageCallback& get_page_callback) = 0; | 46 const GetPageCallback& get_page_callback) = 0; |
46 }; | 47 }; |
47 | 48 |
48 } // namespace printing | 49 } // namespace printing |
49 | 50 |
50 #endif // CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_ | 51 #endif // CHROME_BROWSER_PRINTING_PDF_TO_EMF_CONVERTER_H_ |
OLD | NEW |