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