diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-29 20:15:46 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-29 20:15:46 +0000 |
commit | 5931a6430264b34744d8a0908fcb2a10a88bce89 (patch) | |
tree | ec16879efc3d944d52873c83851cceb5db2dc403 /ppapi/c/dev | |
parent | 6a892ebcf000d3c1d742c4b8c404b2df6be07e90 (diff) | |
download | chromium_src-5931a6430264b34744d8a0908fcb2a10a88bce89.zip chromium_src-5931a6430264b34744d8a0908fcb2a10a88bce89.tar.gz chromium_src-5931a6430264b34744d8a0908fcb2a10a88bce89.tar.bz2 |
ppapi: Make 0.4 the default for PPP_Printing_Dev, leave backwards-compat.
Since I didn't land this before the NaCl proxy move to chrome, I had to incorporate the proxy changes that were in http://codereview.chromium.org/7714041/
After PDF lands, I should be able to remove backwards-compat code.
BUG=80696
TEST=ppapi tests, manual test of PDF plugin
Review URL: http://codereview.chromium.org/7718004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/dev')
-rw-r--r-- | ppapi/c/dev/ppp_printing_dev.h | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/ppapi/c/dev/ppp_printing_dev.h b/ppapi/c/dev/ppp_printing_dev.h index 658fd23..2662826 100644 --- a/ppapi/c/dev/ppp_printing_dev.h +++ b/ppapi/c/dev/ppp_printing_dev.h @@ -36,19 +36,10 @@ typedef enum { PP_PRINTOUTPUTFORMAT_POSTSCRIPT_0_4 = 1u << 2 } PP_PrintOutputFormat_Dev_0_4; -/* TODO(dmichael): Remove the conditional compilation when NaCl proxy is - ported to 0.4. Remove 0.3 when PDF is ported. */ -#ifdef PPP_PRINTING_DEV_USE_0_4 typedef PP_PrintOutputFormat_Dev_0_4 PP_PrintOutputFormat_Dev; #define PP_PRINTOUTPUTFORMAT_RASTER PP_PRINTOUTPUTFORMAT_RASTER_0_4 #define PP_PRINTOUTPUTFORMAT_PDF PP_PRINTOUTPUTFORMAT_PDF_0_4 #define PP_PRINTOUTPUTFORMAT_POSTSCRIPT PP_PRINTOUTPUTFORMAT_POSTSCRIPT_0_4 -#else -typedef PP_PrintOutputFormat_Dev_0_3 PP_PrintOutputFormat_Dev; -#define PP_PRINTOUTPUTFORMAT_RASTER PP_PRINTOUTPUTFORMAT_RASTER_0_3 -#define PP_PRINTOUTPUTFORMAT_PDF PP_PRINTOUTPUTFORMAT_PDF_0_3 -#define PP_PRINTOUTPUTFORMAT_POSTSCRIPT PP_PRINTOUTPUTFORMAT_POSTSCRIPT_0_3 -#endif PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrintOutputFormat_Dev, 4); struct PP_PrintSettings_Dev { @@ -98,13 +89,8 @@ PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_PrintPageNumberRange_Dev, 8); /* Interface for the plugin to implement printing. */ #define PPP_PRINTING_DEV_INTERFACE_0_3 "PPP_Printing(Dev);0.3" #define PPP_PRINTING_DEV_INTERFACE_0_4 "PPP_Printing(Dev);0.4" -#ifdef PPP_PRINTING_DEV_USE_0_4 #define PPP_PRINTING_DEV_INTERFACE PPP_PRINTING_DEV_INTERFACE_0_4 -#else -#define PPP_PRINTING_DEV_INTERFACE PPP_PRINTING_DEV_INTERFACE_0_3 -#endif -#ifdef PPP_PRINTING_DEV_USE_0_4 struct PPP_Printing_Dev { /** * Returns a bit field representing the supported print output formats. For @@ -138,37 +124,13 @@ struct PPP_Printing_Dev { /** Ends the print session. Further calls to PrintPage will fail. */ void (*End)(PP_Instance instance); }; -#else -struct PPP_Printing_Dev { - /** - * Returns an array of supported print output formats. The array is allocated - * using PPB_Core.MemAlloc. The caller is responsible for freeing the array - * using PPB_Core.MemFree. - * Sets |*format_count| to 0 returns NULL if printing is not supported at - * all. - */ - PP_PrintOutputFormat_Dev* (*QuerySupportedFormats)( - PP_Instance instance, uint32_t* format_count); - /* See the alternate definition of PPP_Printing_Dev above for documentation - * on these functions. - */ - int32_t (*Begin)(PP_Instance instance, - const struct PP_PrintSettings_Dev* print_settings); - PP_Resource (*PrintPages)( - PP_Instance instance, - const struct PP_PrintPageNumberRange_Dev* page_ranges, - uint32_t page_range_count); - void (*End)(PP_Instance instance); -}; -#endif /* The following versioned structs are exact copies of the above unversioned - structs, except that PP_PrintSettings_Dev_0_3 or PP_PrintSettings_Dev_0_4 is + struct, except that PP_PrintSettings_Dev_0_3 or PP_PrintSettings_Dev_0_4 is used instead of PP_PrintSettings_Dev. This is for use by Chrome & NaCl, which always use versioned type names. Each must be bit-for-bit compatible with the associated version of PPP_Printing_Dev above. - TODO(dmichael,noelallen): Fix this by having separate internal vs external - headers generated by IDL. */ + TODO(dmichael): Remove versioning from this header. */ struct PPP_Printing_Dev_0_4 { uint32_t (*QuerySupportedFormats)(PP_Instance instance); int32_t (*Begin)(PP_Instance instance, @@ -181,7 +143,7 @@ struct PPP_Printing_Dev_0_4 { }; struct PPP_Printing_Dev_0_3 { - PP_PrintOutputFormat_Dev* (*QuerySupportedFormats)( + PP_PrintOutputFormat_Dev_0_3* (*QuerySupportedFormats)( PP_Instance instance, uint32_t* format_count); int32_t (*Begin)(PP_Instance instance, const struct PP_PrintSettings_Dev_0_3* print_settings); |