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

Unified Diff: printing/pdf_ps_metafile_cairo.h

Issue 2807027: Added support for vector printing for Pepper v1 plugins for Linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Merged Created 10 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 | « chrome/renderer/webplugin_delegate_pepper.cc ('k') | printing/pdf_ps_metafile_cairo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_ps_metafile_cairo.h
===================================================================
--- printing/pdf_ps_metafile_cairo.h (revision 51151)
+++ printing/pdf_ps_metafile_cairo.h (working copy)
@@ -48,6 +48,12 @@
// Note: Only call in the browser to initialize |data_|.
bool Init(const void* src_buffer, uint32 src_buffer_size);
+ // Sets raw PS/PDF data for the document. This is used when a cairo drawing
+ // surface has already been created. This method will cause all subsequent
+ // drawing on the surface to be discarded (in Close()). If Init() has not yet
+ // been called this method simply calls the second version of Init.
+ bool SetRawData(const void* src_buffer, uint32 src_buffer_size);
+
FileFormat GetFileFormat() const { return format_; }
// Prepares a new cairo surface/context for rendering a new page.
@@ -89,6 +95,10 @@
static const double kBottomMarginInInch;
static const double kLeftMarginInInch;
+ // Returns the PdfPsMetafile object that owns the given context. Returns NULL
+ // if the context was not created by a PdfPdMetafile object.
+ static PdfPsMetafile* FromCairoContext(cairo_t* context);
+
private:
// Cleans up all resources.
void CleanUpAll();
@@ -101,6 +111,8 @@
// Buffer stores PDF/PS contents for entire PDF/PS file.
std::string data_;
+ // Buffer stores raw PDF/PS contents set by SetRawPageData.
+ std::string raw_override_data_;
DISALLOW_COPY_AND_ASSIGN(PdfPsMetafile);
};
« no previous file with comments | « chrome/renderer/webplugin_delegate_pepper.cc ('k') | printing/pdf_ps_metafile_cairo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698