OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOCAL_DISCOVERY_PWG_RASTER_CONVERTER_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PWG_RASTER_CONVERTER_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PWG_RASTER_CONVERTER_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PWG_RASTER_CONVERTER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | |
10 #include "base/memory/ref_counted.h" | |
11 #include "base/memory/ref_counted_memory.h" | 9 #include "base/memory/ref_counted_memory.h" |
12 | 10 |
13 namespace base { | 11 namespace base { |
14 class FilePath; | 12 class FilePath; |
15 } | 13 } |
16 | 14 |
| 15 namespace gfx { |
| 16 class Size; |
| 17 } |
| 18 |
| 19 namespace printing { |
| 20 class PdfRenderSettings; |
| 21 } |
| 22 |
17 namespace local_discovery { | 23 namespace local_discovery { |
18 | 24 |
19 class PWGRasterConverter { | 25 class PWGRasterConverter { |
20 public: | 26 public: |
21 // Callback for when the PDF is converted to a PWG raster. | 27 // Callback for when the PDF is converted to a PWG raster. |
22 // |success| denotes whether the conversion succeeded. | 28 // |success| denotes whether the conversion succeeded. |
23 // |temp_file| is the path to the temp file (owned by the converter) that | 29 // |temp_file| is the path to the temp file (owned by the converter) that |
24 // contains the PWG raster data. | 30 // contains the PWG raster data. |
25 typedef base::Callback<void(bool /*success*/, | 31 typedef base::Callback<void(bool /*success*/, |
26 const base::FilePath& /*temp_file*/)> | 32 const base::FilePath& /*temp_file*/)> |
27 ResultCallback; | 33 ResultCallback; |
28 virtual ~PWGRasterConverter() {} | 34 virtual ~PWGRasterConverter() {} |
29 | 35 |
30 static scoped_ptr<PWGRasterConverter> CreateDefault(); | 36 static scoped_ptr<PWGRasterConverter> CreateDefault(); |
31 | 37 |
32 virtual void Start(base::RefCountedBytes* data, | 38 virtual void Start(base::RefCountedMemory* data, |
| 39 const printing::PdfRenderSettings& conversion_settings, |
33 const ResultCallback& callback) = 0; | 40 const ResultCallback& callback) = 0; |
34 }; | 41 }; |
35 | 42 |
36 } // namespace local_discovery | 43 } // namespace local_discovery |
37 | 44 |
38 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PWG_RASTER_CONVERTER_H_ | 45 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PWG_RASTER_CONVERTER_H_ |
OLD | NEW |