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

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: 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 | « no previous file | printing/pdf_metafile_skia.cc » ('j') | printing/pdf_metafile_skia.cc » ('J')
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..8c31662027231839a2b7db40c88ba65baab9b920 100644
--- a/printing/pdf_metafile_skia.h
+++ b/printing/pdf_metafile_skia.h
@@ -28,12 +28,17 @@ struct FileDescriptor;
namespace printing {
+enum SkiaDocumentType {
+ PDF_SKIA_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();
+ PdfMetafileSkia(SkiaDocumentType type = PDF_SKIA_DOCUMENT_TYPE);
Lei Zhang 2016/06/13 21:01:34 Highly prefer no default arguments, especially wit
Lei Zhang 2016/06/13 21:01:34 explicit
hal.canary 2016/06/14 16:34:49 Done.
hal.canary 2016/06/14 16:34:49 Done.
~PdfMetafileSkia() override;
// Metafile methods.
@@ -68,7 +73,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 = PDF_SKIA_DOCUMENT_TYPE);
// This method calls StartPage and then returns an appropriate
// PlatformCanvas implementation bound to the context created by
« no previous file with comments | « no previous file | printing/pdf_metafile_skia.cc » ('j') | printing/pdf_metafile_skia.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698