| Index: printing/pdf_metafile_skia.h
|
| diff --git a/printing/pdf_metafile_skia.h b/printing/pdf_metafile_skia.h
|
| index bc75abd77939a42120fb96c0c50a661f7f0f1b30..58e928b0025454570b4b1bec9e247eb389c4d9d2 100644
|
| --- a/printing/pdf_metafile_skia.h
|
| +++ b/printing/pdf_metafile_skia.h
|
| @@ -10,6 +10,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "build/build_config.h"
|
| #include "printing/metafile.h"
|
| +#include "skia/ext/vector_canvas.h"
|
|
|
| #if defined(OS_WIN)
|
| #include <windows.h>
|
| @@ -62,6 +63,8 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
|
| const MacRenderPageParams& params) const override;
|
| #endif
|
|
|
| + bool SaveTo(base::File* file) const override;
|
| +
|
| #if defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
| // TODO(vitalybuka): replace with SaveTo().
|
| bool SaveToFD(const base::FileDescriptor& fd) const;
|
| @@ -71,17 +74,18 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
|
| 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);
|
| + // VectorCanvas implementation bound to the context created by
|
| + // StartPage or NULL on error. The skia::VectorCanvas pointer that
|
| + // is returned is owned by this PdfMetafileSkia object and does not
|
| + // need to be ref()ed or unref()ed. The canvas will remain valid
|
| + // until FinishPage() or FinishDocument() is called.
|
| + skia::VectorCanvas* GetVectorCanvasForNewPage(const gfx::Size& page_size,
|
| + const gfx::Rect& content_area,
|
| + const float& scale_factor);
|
| +
|
| private:
|
| scoped_ptr<PdfMetafileSkiaData> data_;
|
|
|
| - // True when finish page is outstanding for current page.
|
| - bool page_outstanding_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia);
|
| };
|
|
|
|
|