summaryrefslogtreecommitdiffstats
path: root/printing/pdf_metafile_skia.h
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-23 02:08:57 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-23 02:08:57 +0000
commit19b9d3b580c92f4cf80854227d6d4b366bc34871 (patch)
tree2026e7414e24197ef16d6caa6f0735b8b20e3f51 /printing/pdf_metafile_skia.h
parentad9d525a9aac5e36280d1274e1b8efd6f4e58632 (diff)
downloadchromium_src-19b9d3b580c92f4cf80854227d6d4b366bc34871.zip
chromium_src-19b9d3b580c92f4cf80854227d6d4b366bc34871.tar.gz
chromium_src-19b9d3b580c92f4cf80854227d6d4b366bc34871.tar.bz2
Make Metafile::StartPageForVectorCanvas take the page number as an argument.
This will let us add pages to a metafile out of order for print preview. Also, make PdfMetafileSkia::GetMetafileForCurrentPage use draft mode, now that it's available. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7481019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/pdf_metafile_skia.h')
-rw-r--r--printing/pdf_metafile_skia.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/printing/pdf_metafile_skia.h b/printing/pdf_metafile_skia.h
index 5d6d448..4ce5337 100644
--- a/printing/pdf_metafile_skia.h
+++ b/printing/pdf_metafile_skia.h
@@ -30,6 +30,7 @@ class PdfMetafileSkia : public Metafile {
virtual bool InitFromData(const void* src_buffer, uint32 src_buffer_size);
virtual SkDevice* StartPageForVectorCanvas(
+ int page_number,
const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor);
@@ -72,13 +73,12 @@ class PdfMetafileSkia : public Metafile {
PdfMetafileSkia* GetMetafileForCurrentPage();
private:
- scoped_ptr<PdfMetafileSkiaData> data_;
+ static const int kNoOutstandingPage = -1;
- // True when a draft version of metafile is requested.
- mutable bool draft_;
+ scoped_ptr<PdfMetafileSkiaData> data_;
- // True when finish page is outstanding for current page.
- bool page_outstanding_;
+ // Page number of the outstanding page, or kNoOutstandingPage.
+ int outstanding_page_number_;
DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia);
};