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

Side by Side Diff: ppapi/c/dev/ppb_printing_dev.h

Issue 375253002: [Chrome] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PPB_Printing_Dev changes Created 6 years, 3 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
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 5
6 /* From dev/ppb_printing_dev.idl modified Fri Apr 19 10:45:09 2013. */ 6 /* From dev/ppb_printing_dev.idl modified Fri Apr 19 10:45:09 2013. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_PRINTING_DEV_H_ 8 #ifndef PPAPI_C_DEV_PPB_PRINTING_DEV_H_
9 #define PPAPI_C_DEV_PPB_PRINTING_DEV_H_ 9 #define PPAPI_C_DEV_PPB_PRINTING_DEV_H_
10 10
11 #include "ppapi/c/dev/pp_print_settings_dev.h" 11 #include "ppapi/c/dev/pp_print_settings_dev.h"
12 #include "ppapi/c/pp_bool.h" 12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_completion_callback.h" 13 #include "ppapi/c/pp_completion_callback.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h" 15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_point.h" 16 #include "ppapi/c/pp_point.h"
17 #include "ppapi/c/pp_rect.h" 17 #include "ppapi/c/pp_rect.h"
18 #include "ppapi/c/pp_resource.h" 18 #include "ppapi/c/pp_resource.h"
19 #include "ppapi/c/pp_size.h" 19 #include "ppapi/c/pp_size.h"
20 #include "ppapi/c/pp_stdint.h" 20 #include "ppapi/c/pp_stdint.h"
21 21
22 #define PPB_PRINTING_DEV_INTERFACE_0_7 "PPB_Printing(Dev);0.7" 22 #define PPB_PRINTING_DEV_INTERFACE_0_7 "PPB_Printing(Dev);0.7"
23 #define PPB_PRINTING_DEV_INTERFACE PPB_PRINTING_DEV_INTERFACE_0_7 23 #define PPB_PRINTING_DEV_INTERFACE_0_8 "PPB_Printing(Dev);0.8"
24 #define PPB_PRINTING_DEV_INTERFACE PPB_PRINTING_DEV_INTERFACE_0_8
24 25
25 /** 26 /**
26 * @file 27 * @file
27 * Definition of the PPB_Printing interface. 28 * Definition of the PPB_Printing interface.
28 */ 29 */
29 30
30 31
31 /** 32 /**
32 * @addtogroup Interfaces 33 * @addtogroup Interfaces
33 * @{ 34 * @{
34 */ 35 */
35 struct PPB_Printing_Dev_0_7 { 36 struct PPB_Printing_Dev_0_8 {
36 /** Create a resource for accessing printing functionality. 37 /** Create a resource for accessing printing functionality.
37 * 38 *
38 * @param[in] instance A <code>PP_Instance</code> identifying one instance 39 * @param[in] instance A <code>PP_Instance</code> identifying one instance
39 * of a module. 40 * of a module.
40 * 41 *
41 * @return A <code>PP_Resource</code> containing the printing resource if 42 * @return A <code>PP_Resource</code> containing the printing resource if
42 * successful or 0 if it could not be created. 43 * successful or 0 if it could not be created.
43 */ 44 */
44 PP_Resource (*Create)(PP_Instance instance); 45 PP_Resource (*Create)(PP_Instance instance);
45 /** 46 /**
46 * Outputs the default print settings for the default printer into 47 * Outputs the default print settings for the default printer into
47 * <code>print_settings</code>. The callback is called with 48 * <code>print_settings</code>. The callback is called with
48 * <code>PP_OK</code> when the settings have been retrieved successfully. 49 * <code>PP_OK</code> when the settings have been retrieved successfully.
49 * 50 *
50 * @param[in] resource The printing resource. 51 * @param[in] resource The printing resource.
51 * 52 *
52 * @param[in] callback A <code>CompletionCallback</code> to be called when 53 * @param[in] callback A <code>CompletionCallback</code> to be called when
53 * <code>print_settings</code> have been retrieved. 54 * <code>print_settings</code> have been retrieved.
54 * 55 *
55 * @return PP_OK_COMPLETIONPENDING if request for the default print settings 56 * @return PP_OK_COMPLETIONPENDING if request for the default print settings
56 * was successful, another error code from pp_errors.h on failure. 57 * was successful, another error code from pp_errors.h on failure.
57 */ 58 */
58 int32_t (*GetDefaultPrintSettings)( 59 int32_t (*GetDefaultPrintSettings)(
59 PP_Resource resource, 60 PP_Resource resource,
60 struct PP_PrintSettings_Dev* print_settings, 61 struct PP_PrintSettings_Dev* print_settings,
61 struct PP_CompletionCallback callback); 62 struct PP_CompletionCallback callback);
63 /**
64 * Sets the print preset options in print preview dialog based on properties
65 * set in the source pdf document.
66 *
67 * @param[in] resource The printing resource.
68 *
69 * @param[in] print_options The print preset options set in
70 * <code>PP_PrintPresetOptions_Dev</code>.
71 */
72 void (*SetPrintPresetOptionsFromDocument)(
73 PP_Resource resource,
74 const struct PP_PrintPresetOptions_Dev* print_options);
75 };
76
77 typedef struct PPB_Printing_Dev_0_8 PPB_Printing_Dev;
78
79 struct PPB_Printing_Dev_0_7 {
80 PP_Resource (*Create)(PP_Instance instance);
81 int32_t (*GetDefaultPrintSettings)(
82 PP_Resource resource,
83 struct PP_PrintSettings_Dev* print_settings,
84 struct PP_CompletionCallback callback);
62 }; 85 };
63
64 typedef struct PPB_Printing_Dev_0_7 PPB_Printing_Dev;
65 /** 86 /**
66 * @} 87 * @}
67 */ 88 */
68 89
69 #endif /* PPAPI_C_DEV_PPB_PRINTING_DEV_H_ */ 90 #endif /* PPAPI_C_DEV_PPB_PRINTING_DEV_H_ */
70 91
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698