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

Side by Side Diff: ppapi/c/private/ppp_pdf.h

Issue 974183003: Print Preview: Support the duplex preset in PDFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsepez comments Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_C_PRIVATE_PPP_PDF_H_ 5 #ifndef PPAPI_C_PRIVATE_PPP_PDF_H_
6 #define PPAPI_C_PRIVATE_PPP_PDF_H_ 6 #define PPAPI_C_PRIVATE_PPP_PDF_H_
7 7
8 #include "ppapi/c/dev/pp_print_settings_dev.h" 8 #include "ppapi/c/dev/pp_print_settings_dev.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_point.h" 10 #include "ppapi/c/pp_point.h"
11 #include "ppapi/c/pp_var.h" 11 #include "ppapi/c/pp_var.h"
12 12
13 #define PPP_PDF_INTERFACE_1 "PPP_Pdf;1" 13 #define PPP_PDF_INTERFACE_1 "PPP_Pdf;1"
14 #define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1 14 #define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1
15 15
16 typedef enum { 16 typedef enum {
17 // Rotates the page 90 degrees clockwise from its current orientation. 17 // Rotates the page 90 degrees clockwise from its current orientation.
18 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CW, 18 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CW,
19 // Rotates the page 90 degrees counterclockwise from its current orientation. 19 // Rotates the page 90 degrees counterclockwise from its current orientation.
20 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CCW 20 PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CCW
21 } PP_PrivatePageTransformType; 21 } PP_PrivatePageTransformType;
22 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivatePageTransformType, 4); 22 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivatePageTransformType, 4);
23 23
24 typedef enum {
25 PP_PRIVATEDUPLEXMODE_NONE = 0,
26 PP_PRIVATEDUPLEXMODE_SIMPLEX = 1,
27 PP_PRIVATEDUPLEXMODE_SHORT_EDGE = 2,
28 PP_PRIVATEDUPLEXMODE_LONG_EDGE = 3,
29 PP_PRIVATEDUPLEXMODE_LAST = PP_PRIVATEDUPLEXMODE_LONG_EDGE
30 } PP_PrivateDuplexMode_Dev;
31 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivateDuplexMode_Dev, 4);
32
24 struct PP_PdfPrintPresetOptions_Dev { 33 struct PP_PdfPrintPresetOptions_Dev {
25 // Returns whether scaling is disabled. Returns same information as the 34 // Returns whether scaling is disabled. Returns same information as the
26 // PPP_Printing_Dev's method IsScalingDiabled(). 35 // PPP_Printing_Dev's method IsScalingDiabled().
27 PP_Bool is_scaling_disabled; 36 PP_Bool is_scaling_disabled;
28 37
29 // Number of copies to be printed. 38 // Number of copies to be printed.
30 int32_t copies; 39 int32_t copies;
40
41 // DuplexMode to be used for printing.
42 PP_PrivateDuplexMode_Dev duplex;
31 }; 43 };
32 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PdfPrintPresetOptions_Dev, 8); 44 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PdfPrintPresetOptions_Dev, 12);
33 45
34 struct PPP_Pdf_1_1 { 46 struct PPP_Pdf_1_1 {
35 // Returns an absolute URL if the position is over a link. 47 // Returns an absolute URL if the position is over a link.
36 PP_Var (*GetLinkAtPosition)(PP_Instance instance, 48 PP_Var (*GetLinkAtPosition)(PP_Instance instance,
37 PP_Point point); 49 PP_Point point);
38 50
39 // Requests that the plugin apply the given transform to its view. 51 // Requests that the plugin apply the given transform to its view.
40 void (*Transform)(PP_Instance instance, PP_PrivatePageTransformType type); 52 void (*Transform)(PP_Instance instance, PP_PrivatePageTransformType type);
41 53
42 // Return true if print preset options are updated from document. 54 // Return true if print preset options are updated from document.
43 PP_Bool (*GetPrintPresetOptionsFromDocument)( 55 PP_Bool (*GetPrintPresetOptionsFromDocument)(
44 PP_Instance instance, 56 PP_Instance instance,
45 PP_PdfPrintPresetOptions_Dev* options); 57 PP_PdfPrintPresetOptions_Dev* options);
46 }; 58 };
47 59
48 typedef PPP_Pdf_1_1 PPP_Pdf; 60 typedef PPP_Pdf_1_1 PPP_Pdf;
49 61
50 #endif // PPAPI_C_PRIVATE_PPP_PDF_H_ 62 #endif // PPAPI_C_PRIVATE_PPP_PDF_H_
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698