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

Unified Diff: printing/pdf_metafile_skia.h

Issue 697373004: Moved StartPageForVectorCanvas from Metafile to PdfMetafileSkia. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tue Nov 4 10:41:42 PST 2014 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
« no previous file with comments | « printing/pdf_metafile_cg_mac.cc ('k') | no next file » | 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 706c56aee36b5951cda6283e424ae7e421987ed6..bc75abd77939a42120fb96c0c50a661f7f0f1b30 100644
--- a/printing/pdf_metafile_skia.h
+++ b/printing/pdf_metafile_skia.h
@@ -15,6 +15,8 @@
#include <windows.h>
#endif
+class SkBaseDevice;
+
#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
namespace base {
struct FileDescriptor;
@@ -35,10 +37,6 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
bool Init() override;
bool InitFromData(const void* src_buffer, uint32 src_buffer_size) override;
- SkBaseDevice* StartPageForVectorCanvas(const gfx::Size& page_size,
- const gfx::Rect& content_area,
- const float& scale_factor) override;
-
bool StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) override;
@@ -72,6 +70,12 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
// Return a new metafile containing just the current page in draft mode.
scoped_ptr<PdfMetafileSkia> GetMetafileForCurrentPage();
+ // This method calls StartPage and then returns an appropriate
+ // VectorPlatformDevice implementation bound to the context created by
+ // StartPage or NULL on error.
+ SkBaseDevice* StartPageForVectorCanvas(const gfx::Size& page_size,
+ const gfx::Rect& content_area,
+ const float& scale_factor);
private:
scoped_ptr<PdfMetafileSkiaData> data_;
« no previous file with comments | « printing/pdf_metafile_cg_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698