diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 22:11:16 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 22:11:16 +0000 |
commit | 37f31054c7415aa893179b32efb0eac1029819af (patch) | |
tree | 69d74fe8d0ead8328c866c5f091c502cc5ecf47d /third_party | |
parent | 10fc3db93f082025c005f097ea45c381bdfb3cd0 (diff) | |
download | chromium_src-37f31054c7415aa893179b32efb0eac1029819af.zip chromium_src-37f31054c7415aa893179b32efb0eac1029819af.tar.gz chromium_src-37f31054c7415aa893179b32efb0eac1029819af.tar.bz2 |
Added support for vector printing for Pepper v1 plugins for Linux.
BUG=None
TEST=Test printing from Chrome PDF plugin on Linux.
Review URL: http://codereview.chromium.org/2807027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/npapi/bindings/npapi_extensions.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/third_party/npapi/bindings/npapi_extensions.h b/third_party/npapi/bindings/npapi_extensions.h index ec0eaf9..0ce4360 100644 --- a/third_party/npapi/bindings/npapi_extensions.h +++ b/third_party/npapi/bindings/npapi_extensions.h @@ -952,6 +952,13 @@ struct _NPDeviceContextAudio { /* Printing related APIs ---------------------------------------------------*/ +/* Defines a contiguous range of pages to be printed. Page numbers use a + * zero-based index. */ +typedef struct _NPPrintPageNumberRange { + int32_t firstPageNumber; + int32_t lastPageNumber; +} NPPrintPageNumberRange; + /* Being a print operation. Returns the total number of pages to print at the * given printableArea size and DPI. printableArea is in points (a point is 1/72 * of an inch). The plugin is expected to remember the values of printableArea @@ -975,12 +982,14 @@ 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 +/* Prints the specified pages 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); +typedef NPError (*NPPrintPagesAsPDFPtr)(NPP instance, + NPPrintPageNumberRange* page_ranges, + int32_t page_range_count, + unsigned char** pdf_output, + int32_t* output_size); /* TODO(sanjeevr) : Provide a vector interface for printing. We need to decide @@ -992,7 +1001,7 @@ typedef struct _NPPPrintExtensions { NPPGetRasterDimensionsPtr getRasterDimensions; NPPPrintPageRasterPtr printPageRaster; NPPPrintEndPtr printEnd; - NPPrintPageAsPDFPtr printPageAsPDF; + NPPrintPagesAsPDFPtr printPagesAsPDF; } NPPPrintExtensions; /* Returns NULL if the plugin does not support print extensions */ |