| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 PRINTING_PDF_METAFILE_SKIA_H_ | 5 #ifndef PRINTING_PDF_METAFILE_SKIA_H_ |
| 6 #define PRINTING_PDF_METAFILE_SKIA_H_ | 6 #define PRINTING_PDF_METAFILE_SKIA_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "cc/paint/paint_canvas.h" | 14 #include "cc/paint/paint_canvas.h" |
| 15 #include "printing/common/pdf_metafile_utils.h" |
| 15 #include "printing/metafile.h" | 16 #include "printing/metafile.h" |
| 16 #include "skia/ext/platform_canvas.h" | 17 #include "skia/ext/platform_canvas.h" |
| 17 | 18 |
| 18 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
| 19 #include <windows.h> | 20 #include <windows.h> |
| 20 #endif | 21 #endif |
| 21 | 22 |
| 22 namespace printing { | 23 namespace printing { |
| 23 | 24 |
| 24 enum SkiaDocumentType { | |
| 25 PDF_SKIA_DOCUMENT_TYPE, | |
| 26 // MSKP is an experimental, fragile, and diagnostic-only document type. | |
| 27 MSKP_SKIA_DOCUMENT_TYPE, | |
| 28 }; | |
| 29 | |
| 30 struct PdfMetafileSkiaData; | 25 struct PdfMetafileSkiaData; |
| 31 | 26 |
| 32 // This class uses Skia graphics library to generate a PDF document. | 27 // This class uses Skia graphics library to generate a PDF document. |
| 33 class PRINTING_EXPORT PdfMetafileSkia : public Metafile { | 28 class PRINTING_EXPORT PdfMetafileSkia : public Metafile { |
| 34 public: | 29 public: |
| 35 explicit PdfMetafileSkia(SkiaDocumentType type); | 30 explicit PdfMetafileSkia(SkiaDocumentType type); |
| 36 ~PdfMetafileSkia() override; | 31 ~PdfMetafileSkia() override; |
| 37 | 32 |
| 38 // Metafile methods. | 33 // Metafile methods. |
| 39 bool Init() override; | 34 bool Init() override; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 77 |
| 83 private: | 78 private: |
| 84 std::unique_ptr<PdfMetafileSkiaData> data_; | 79 std::unique_ptr<PdfMetafileSkiaData> data_; |
| 85 | 80 |
| 86 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); | 81 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); |
| 87 }; | 82 }; |
| 88 | 83 |
| 89 } // namespace printing | 84 } // namespace printing |
| 90 | 85 |
| 91 #endif // PRINTING_PDF_METAFILE_SKIA_H_ | 86 #endif // PRINTING_PDF_METAFILE_SKIA_H_ |
| OLD | NEW |