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

Unified Diff: printing/pdf_metafile_skia.h

Issue 694213002: Remove calls to deprecated SkPDFDevice and SkPDFDocuemnt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments from Vitaly Created 6 years, 1 month 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
Index: printing/pdf_metafile_skia.h
diff --git a/printing/pdf_metafile_skia.h b/printing/pdf_metafile_skia.h
index 706c56aee36b5951cda6283e424ae7e421987ed6..76093d6b7c098291bd220621e4ffd9097d94c5ba 100644
--- a/printing/pdf_metafile_skia.h
+++ b/printing/pdf_metafile_skia.h
@@ -35,6 +35,12 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
bool Init() override;
bool InitFromData(const void* src_buffer, uint32 src_buffer_size) override;
+ skia::RefPtr<skia::VectorCanvas> GetVectorCanvasForNewPage(
+ const gfx::Size& page_size, const gfx::Rect& content_area,
+ const float& scale_factor) override;
+
+ // Deprecated. Please use GetVectorCanvasForNewPage().
+ // TODO: Remove from Metafile class. http://crbug.com/278148
SkBaseDevice* StartPageForVectorCanvas(const gfx::Size& page_size,
Vitaly Buka (NO REVIEWS) 2014/11/04 19:23:55 Please just remove StartPageForVectorCanvas. There
const gfx::Rect& content_area,
const float& scale_factor) override;
@@ -69,15 +75,14 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
bool SaveToFD(const base::FileDescriptor& fd) const;
#endif // if defined(OS_CHROMEOS) || defined(OS_ANDROID)
- // Return a new metafile containing just the current page in draft mode.
+ // Return a new metafile containing just the current page.
scoped_ptr<PdfMetafileSkia> GetMetafileForCurrentPage();
+ bool SaveTo(base::File* file) const override;
+
private:
scoped_ptr<PdfMetafileSkiaData> data_;
- // True when finish page is outstanding for current page.
- bool page_outstanding_;
-
DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia);
};

Powered by Google App Engine
This is Rietveld 408576698