Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: printing/pdf_metafile_skia.h

Issue 2064843002: PdfMetafileSkia: start supporting more document types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-15 (Wednesday) 10:43:48 EDT Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/printing/test/mock_printer.cc ('k') | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_metafile_skia.h
diff --git a/printing/pdf_metafile_skia.h b/printing/pdf_metafile_skia.h
index 0b7e8268980a20c66ab1da140999f2c58f73d699..28bd41f4cb4a01af7aaf73cfe28e54ecc5d59f3b 100644
--- a/printing/pdf_metafile_skia.h
+++ b/printing/pdf_metafile_skia.h
@@ -20,20 +20,20 @@
class SkCanvas;
-#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
-namespace base {
-struct FileDescriptor;
-}
-#endif
-
namespace printing {
+enum SkiaDocumentType {
+ PDF_SKIA_DOCUMENT_TYPE,
+ // MSKP is an experimental, fragile, and diagnostic-only document type.
+ MSKP_SKIA_DOCUMENT_TYPE,
+};
+
struct PdfMetafileSkiaData;
// This class uses Skia graphics library to generate a PDF document.
class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
public:
- PdfMetafileSkia();
+ explicit PdfMetafileSkia(SkiaDocumentType type);
~PdfMetafileSkia() override;
// Metafile methods.
@@ -68,7 +68,8 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
bool SaveTo(base::File* file) const override;
// Return a new metafile containing just the current page in draft mode.
- std::unique_ptr<PdfMetafileSkia> GetMetafileForCurrentPage();
+ std::unique_ptr<PdfMetafileSkia> GetMetafileForCurrentPage(
+ SkiaDocumentType type);
// This method calls StartPage and then returns an appropriate
// PlatformCanvas implementation bound to the context created by
« no previous file with comments | « components/printing/test/mock_printer.cc ('k') | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698