OLD | NEW |
(Empty) | |
| 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/logging.h" |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/ref_counted_memory.h" |
| 12 |
| 13 namespace base { |
| 14 class FilePath; |
| 15 } |
| 16 |
| 17 namespace local_discovery { |
| 18 |
| 19 class PWGRasterConverter { |
| 20 public: |
| 21 // Callback for when the PDF is converted to a PWG raster. |
| 22 // |success| denotes whether the conversion succeeded. |
| 23 // |temp_file| is the path to the temp file (owned by the converter) that |
| 24 // contains the PWG raster data. |
| 25 typedef base::Callback<void(bool /*success*/, |
| 26 const base::FilePath& /*temp_file*/)> |
| 27 ResultCallback; |
| 28 virtual ~PWGRasterConverter() {} |
| 29 |
| 30 static scoped_ptr<PWGRasterConverter> CreateDefault(); |
| 31 |
| 32 virtual void SetResultCallback(const ResultCallback& callback) = 0; |
| 33 virtual void SetPDFData(scoped_refptr<base::RefCountedBytes> data) = 0; |
| 34 |
| 35 virtual void Start() = 0; |
| 36 }; |
| 37 |
| 38 } // namespace local_discovery |
| 39 |
| 40 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PWG_RASTER_CONVERTER_H_ |
OLD | NEW |