summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 04:55:26 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 04:55:26 +0000
commit4ee0c53f86c1b2e0da904018c6bc0c8fdcda28a4 (patch)
treed158969797da469d8b231a472a0e085be0fbcf8c /third_party
parent28d25f732e0b024c491cd5c76e8a7a63e7c494b3 (diff)
downloadchromium_src-4ee0c53f86c1b2e0da904018c6bc0c8fdcda28a4.zip
chromium_src-4ee0c53f86c1b2e0da904018c6bc0c8fdcda28a4.tar.gz
chromium_src-4ee0c53f86c1b2e0da904018c6bc0c8fdcda28a4.tar.bz2
Added support for vector printing for Pepper v1 plugins for Windows. Mac and Linux to follow.
BUG=None. TEST=Test printing from Chrome PDF plugin on Windows. Review URL: http://codereview.chromium.org/2863019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50699 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/npapi/bindings/npapi_extensions.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/third_party/npapi/bindings/npapi_extensions.h b/third_party/npapi/bindings/npapi_extensions.h
index ec93c29..cbc9e69 100644
--- a/third_party/npapi/bindings/npapi_extensions.h
+++ b/third_party/npapi/bindings/npapi_extensions.h
@@ -982,6 +982,13 @@ typedef NPError (*NPPPrintPageRasterPtr) (
NPDeviceContext2D* printSurface);
/* Ends the print operation */
typedef NPError (*NPPPrintEndPtr) (NPP instance);
+/* Prints the specified page as PDF. The plugin allocates the output buffer
+ * pointed to by pdf_output using the browser-supplied NPN_MemAlloc function.
+ * The caller is expected to free the output buffer upon success.*/
+typedef NPError (*NPPrintPageAsPDFPtr)(NPP instance, int32_t page_number,
+ unsigned char** pdf_output,
+ int32_t* output_size);
+
/* TODO(sanjeevr) : Provide a vector interface for printing. We need to decide
* on a vector format that can support embedded fonts. A vector format will
@@ -992,6 +999,7 @@ typedef struct _NPPPrintExtensions {
NPPGetRasterDimensionsPtr getRasterDimensions;
NPPPrintPageRasterPtr printPageRaster;
NPPPrintEndPtr printEnd;
+ NPPrintPageAsPDFPtr printPageAsPDF;
} NPPPrintExtensions;
/* Returns NULL if the plugin does not support print extensions */