diff options
author | n.bansal <n.bansal@samsung.com> | 2014-11-19 00:38:48 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-19 08:39:13 +0000 |
commit | 64c4daa7d64fc28efd1e49bf3548323eb67a32ec (patch) | |
tree | 2e2255c3caa533e38d359cf139e9d598f8d6938d /ppapi/c/private | |
parent | 8747c1d912e10bbb8fe746ff6a06bb5a3d067efc (diff) | |
download | chromium_src-64c4daa7d64fc28efd1e49bf3548323eb67a32ec.zip chromium_src-64c4daa7d64fc28efd1e49bf3548323eb67a32ec.tar.gz chromium_src-64c4daa7d64fc28efd1e49bf3548323eb67a32ec.tar.bz2 |
Support NumCopies print preset
Chrome side changes to support NumCopies print preset option.
Copies in print preview dialog should be set to value set for
NumCopies in pdf source document.
BUG=169120
Review URL: https://codereview.chromium.org/375253002
Cr-Commit-Position: refs/heads/master@{#304785}
Diffstat (limited to 'ppapi/c/private')
-rw-r--r-- | ppapi/c/private/ppp_pdf.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/ppapi/c/private/ppp_pdf.h b/ppapi/c/private/ppp_pdf.h index 144e95c..86e0fd9 100644 --- a/ppapi/c/private/ppp_pdf.h +++ b/ppapi/c/private/ppp_pdf.h @@ -5,6 +5,7 @@ #ifndef PPAPI_C_PRIVATE_PPP_PDF_H_ #define PPAPI_C_PRIVATE_PPP_PDF_H_ +#include "ppapi/c/dev/pp_print_settings_dev.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_point.h" #include "ppapi/c/pp_var.h" @@ -20,15 +21,37 @@ typedef enum { } PP_PrivatePageTransformType; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivatePageTransformType, 4); -struct PPP_Pdf_1 { +struct PP_PdfPrintPresetOptions_Dev { + // Returns whether scaling is disabled. Returns same information as the + // PPP_Printing_Dev's method IsScalingDiabled(). + PP_Bool is_scaling_disabled; + + // Number of copies to be printed. + int32_t copies; + + // DuplexMode to be used for printing. + PP_PrintDuplexMode_Dev duplex; + + // Page range to be used for printing. + struct PP_PrintRange_Dev page_range; + int32_t page_range_count; +}; +PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PdfPrintPresetOptions_Dev, 24); + +struct PPP_Pdf_1_1 { // Returns an absolute URL if the position is over a link. PP_Var (*GetLinkAtPosition)(PP_Instance instance, PP_Point point); // Requests that the plugin apply the given transform to its view. void (*Transform)(PP_Instance instance, PP_PrivatePageTransformType type); + + // Return true if print preset options are updated from document. + PP_Bool (*GetPrintPresetOptionsFromDocument)( + PP_Instance instance, + PP_PdfPrintPresetOptions_Dev* options); }; -typedef PPP_Pdf_1 PPP_Pdf; +typedef PPP_Pdf_1_1 PPP_Pdf; #endif // PPAPI_C_PRIVATE_PPP_PDF_H_ |